marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

How to set angular injector to strict mode? #129

Open clhma opened 9 years ago

clhma commented 9 years ago

Hi,

With angular 1.3 it is possible to set the dependency injector to strict mode. It looks like it is not possible with AngularAMD. Currently AngularAMD calls angular.bootstrap with only 2 parameters (line 448): orig_angular.bootstrap(elem, [app_name]); So it is no possible to define a config to angular.bootstrap (third parameter of the function in angular 1.3). To fix this issue, I had to override angular.boostrap function to set strict mode to true. But It would be great to be able to set a config with angularAMD.

Regards,

clhma

marcoslin commented 9 years ago

Good point. I marked it as an enhancement for next version. More specifically, need to support optional config param of .bootstrap method as per:

https://docs.angularjs.org/api/ng/function/angular.bootstrap

pratikf commented 9 years ago

+1

Maybe config can be added as an optional parameter to this function and be passed to angular.bootstrap call: AngularAMD.prototype.bootstrap = function (app, enable_ngload, elem, config) { ... }