Not sure what's wrong with my code, I got error of angular.min.js:17 Uncaught Error: No module: MyApp
(function() {
angular.module("MyApp")
.controller('MyCtrl', myController);
function myController() {
var vm = this;
var item = [{
"name": "James",
"age": 20
}, {
"name": "John",
"age": 20
}]
}
})();
I did declare this in the view
<div ng-app="MyApp">
angular.module('MyApp', [])