diff --git a/templates/coffeescript-min/decorator.coffee b/templates/coffeescript-min/decorator.coffee new file mode 100644 index 000000000..713877991 --- /dev/null +++ b/templates/coffeescript-min/decorator.coffee @@ -0,0 +1,7 @@ +'use strict'; + +angular.module("<%= _.camelize(appname) %>App").config ["$provide", ($provide) -> + $provide.decorator "<%= _.camelize(name) %>", ($delegate) -> + # decorate the $delegate + $delegate +] diff --git a/templates/coffeescript/decorator.coffee b/templates/coffeescript/decorator.coffee new file mode 100644 index 000000000..d34411c85 --- /dev/null +++ b/templates/coffeescript/decorator.coffee @@ -0,0 +1,6 @@ +'use strict'; + +angular.module("<%= _.camelize(appname) %>App").config ($provide) -> + $provide.decorator "<%= _.camelize(name) %>", ($delegate) -> + # decorate the $delegate + $delegate diff --git a/templates/javascript-min/decorator.js b/templates/javascript-min/decorator.js new file mode 100644 index 000000000..aaa0173d0 --- /dev/null +++ b/templates/javascript-min/decorator.js @@ -0,0 +1,9 @@ +'use strict'; + +angular.module('<%= _.camelize(appname) %>App') + .config( ['$provide', function ($provide) { + $provide.decorator('<%= _.camelize(name) %>', function($delegate){ + // decorate the $delegate + return $delegate; + }); + }]); diff --git a/templates/javascript/decorator.js b/templates/javascript/decorator.js new file mode 100644 index 000000000..c07fb49bf --- /dev/null +++ b/templates/javascript/decorator.js @@ -0,0 +1,9 @@ +'use strict'; + +angular.module('<%= _.camelize(appname) %>App') + .config(function ($provide) { + $provide.decorator('<%= _.camelize(name) %>', function($delegate){ + // decorate the $delegate + return $delegate; + }); + });