rename.annotated.js 2.4 KB

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