4 ms·
Is it really how it is done in Angular? Sounds like it would break if I introduce a minification step with name mangling. Edit: I am not really into Angular so
by imslavko 13y ago
Is it really how it is done in Angular? Sounds like it would break if I introduce a minification step with name mangling.
Edit: I am not really into Angular so I was surprised to see such reflection on functions. Good to know there are a lot of solutions to that already.
- inportb 13y agoIt does break if you introduce a minification step with name mangling. http://docs.angularjs.org/tutorial/step_05 http://docs.angularjs.org/tutorial/step_05 (see A Note on Minification)
- tomjakubowski 13y agoThe typical workaround for this is to introduce a transformation in your build process that turns the developer-friendly: myModule.controller('FooCtrl', function ($rootScope) {}); into the minification-safe: myModule.controller('FooCtrl', ['$rootScope', function ($rootScope) {}]);
- mbell 13y agongmin takes care of this issue for the most part: https://github.com/btford/ngmin https://github.com/btford/ngmin
- geuis 13y agoIt does. Quick tip: don't forget you have to name your dependencies on route resolves too. They get broken with minification too