You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using this method myMod leak into global scope (most AngularJS apps don't use AMD, mine too), so I'm not using it. I also don't use chained way of source, cos I don't like it.
However, as I'm using CoffeeScript, I explored really nice way of isolating modules like this:
do(module=angular.module('myMod', [])) ->module.service('myService', ($scope) -># do something
This yields nicely isolated component with this JS code:
(function(module){returnmodule.service('myService',function($scope){// do something});}(angular.module('myMod')));
Of course this is not recognized by ngmin. I would much appreciate if ngmin will support this syntax. That do call in CfS looks like namespacing schema implemented by Angular's module system, so I really like it.
The text was updated successfully, but these errors were encountered:
There is a support for ngmining of refenced modules as mentioned in doc:
By using this method
myMod
leak into global scope (most AngularJS apps don't use AMD, mine too), so I'm not using it. I also don't use chained way of source, cos I don't like it.However, as I'm using CoffeeScript, I explored really nice way of isolating modules like this:
This yields nicely isolated component with this JS code:
Of course this is not recognized by
ngmin
. I would much appreciate ifngmin
will support this syntax. Thatdo
call in CfS looks like namespacing schema implemented by Angular's module system, so I really like it.The text was updated successfully, but these errors were encountered: