From c9f80b3d0beac7378910ea18014f6e48c1579d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Bo=CC=88hm?= Date: Mon, 29 Apr 2013 20:17:50 +0200 Subject: [PATCH] feat(decorator): Add decorator template files --- templates/coffeescript-min/decorator.coffee | 7 +++++++ templates/coffeescript/decorator.coffee | 6 ++++++ templates/javascript-min/decorator.js | 9 +++++++++ templates/javascript/decorator.js | 9 +++++++++ 4 files changed, 31 insertions(+) create mode 100644 templates/coffeescript-min/decorator.coffee create mode 100644 templates/coffeescript/decorator.coffee create mode 100644 templates/javascript-min/decorator.js create mode 100644 templates/javascript/decorator.js 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; + }); + });