angularAMD icon indicating copy to clipboard operation
angularAMD copied to clipboard

How to set angular injector to strict mode?

Open clhma opened this issue 10 years ago • 2 comments

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

clhma avatar Jan 06 '15 16:01 clhma

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

marcoslin avatar Jan 06 '15 16:01 marcoslin

+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) { ... }

pratikf avatar Feb 23 '15 19:02 pratikf