rename.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. "use strict";
  2. // long form
  3. angular.module("MyMod").controller("MyCtrl", function($a, $b) {
  4. });
  5. // w/ dependencies
  6. angular.module("MyMod", ["OtherMod"]).controller("MyCtrl", function($c, $d, $e, $f, $g, $h, $i) {
  7. });
  8. // simple
  9. myMod.service("$a", function($b) {
  10. });
  11. myMod.controller("foo", function($a, $b) {
  12. });
  13. myMod.service("foo", function($c, $d) {
  14. });
  15. myMod.factory("foo", function($e, $f) {
  16. });
  17. myMod.directive("foo", function($g, $h) {
  18. });
  19. myMod.filter("foo", function($i, $a) {
  20. });
  21. myMod.animation("foo", function($b, $c) {
  22. });
  23. myMod.invoke("foo", function($d, $e) {
  24. });
  25. // implicit config function
  26. angular.module("MyMod", ["OtherMod"], function($interpolateProvider) {}).controller("foo", function($f) {});
  27. // object property
  28. var myObj = {};
  29. myObj.myMod = angular.module("MyMod");
  30. myObj.myMod.controller("foo", function($g, $h) { a });
  31. // run, config don't take names
  32. myMod.run(function($i, $a) {
  33. });
  34. angular.module("MyMod").run(function($b) {
  35. });
  36. myMod.config(function($c, $d) {
  37. });
  38. angular.module("MyMod").config(function() {
  39. });
  40. // directive return object
  41. myMod.directive("foo", function($e) {
  42. return {
  43. controller: function($f, $g) {
  44. bar;
  45. }
  46. }
  47. });
  48. myMod.directive("foo", function($h) {
  49. return {
  50. controller: function() {
  51. bar;
  52. }
  53. }
  54. });
  55. // provider, provider $get
  56. myMod.provider("foo", function($i) {
  57. this.$get = function($a, $b) {
  58. bar;
  59. };
  60. self.$get = function($c) {};
  61. that.$get = function($d) {};
  62. ignore.$get = function($e) {};
  63. });
  64. myMod.provider("foo", function() {
  65. this.$get = function($f) {
  66. bar;
  67. };
  68. });
  69. myMod.provider("foo", function() {
  70. return {
  71. $get: function($g, $h) {
  72. bar;
  73. }};
  74. });
  75. myMod.provider("foo", {
  76. $get: function($i) {
  77. bar;
  78. }
  79. });