"angular.min.js:6Uncaught Error: [$injector:modulerr]"  - This AngularJS error occurs when we do not initialize our Angular app. To make it clear, look at the example below:
<div ng-app='myapp' ng-init='names=[{name:"guna",age:27},{name:"harsha",age:"15"}]' ></div>
In the above example, we have defined an angular app section named "myapp". For all named apps we need to initiliaze the app by creating an angular module in javascript, like the one given here:
var app = angular.module('myapp', []);
That will fix this angular.min.js:6Uncaught Error: [$injector:modulerr] error. But look at this one:
<div ng-app='' ng-init='names=[{name:"guna",age:27},{name:"harsha",age:"15"}]' ></div>
Above app isn't defined with any name, so it will be considered as default app and it doesn't require any initilization too.

Comments (0)
Leave a Comment

loader Posting your comment...