ng-strict-di in angularjs
Angular introduced ng-strict-di directive in v1.3. Ng-strict-di stands for strict dependency injection mode. When you want to annotate your javascript code files to make them min-safe you can enable this strict di mode on your application so that you will not be surprised to see your code breaking on the production system. ng-strict-di mode breaks the app if there is even a single file or controller or any other type of object is not annotated, that way we can be sure that we are not missing any files while manually annotating our code.
Tools available to automatically annotate your angular code, you might wanna try that out rather than manually annotating them if you have large number of files in your application.
To enable this strict dependency mode you need to do something like this.
Tools available to automatically annotate your angular code, you might wanna try that out rather than manually annotating them if you have large number of files in your application.
To enable this strict dependency mode you need to do something like this.
<html ng-app='app' ng-strict-di>
Comments
Post a Comment