I am attempting to display a list of items using angular loaded via require.
I have two files
index.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test App</title>
<script data-main="/Scripts/app/main" src="../Scripts/lib/require.js"></script>
</head>
<body ng-controller="AppCntrl">
<ul>
<li ng-repeat="phone in appCntrl.phones">
{{phone.name}}
<p>{{phone.snippet}}</p>
</li>
</ul>
</body>
</html>
and main.js
require.config({
baseUrl: '/Scripts/',
urlArgs: "bust=" + (new Date()).getTime(),
paths: {
'angular': 'lib/angular/angular.min',
'angular-resource': 'lib/angular/angular-resource.min'
},
shim: {
'angular': { 'exports': 'angular' },
'angular-resource': { deps: ['angular'] }
}
});
require(['angular', 'angular-resource'], function (angular) {
var mainMod = angular.module('mainMod', ['ngResource']);
mainMod.controller('AppCntrl'['$scope', function ($scope) {
$scope.phones = [
{
'name': 'Nexus S',
'snippet': 'Fast just got faster with Nexus S.'
},
{
'name': 'Motorola XOOM™ with Wi-Fi',
'snippet': 'The Next, Next Generation tablet.'
},
{
'name': 'MOTOROLA XOOM™',
'snippet': 'The Next, Next Generation tablet.'
}
];
}]);
angular.bootstrap(document, ['mainMod']);
});
I am not getting any console errors. Just an empty page
UPDATE
I made an update and now getting Error[ng:areq] I think this is progress
UPDATE2
I am not getting error
Cannot call method '$$minErr' of undefined
UPDATE 3
Error: [ng:areq]