I am currently having trouble getting angular JS to display, and I'm not sure what I'm doing wrong as it only shows up as plain text in my browser and doesn't get the info passed from the app2.js.
I have all dependencies properly placed in the locations listed in my code, so I'm thinking that I may have made an error in my code?
My code is as follows.
<!DOCTYPE html>
<html ng-app="phonecatApp" lang="en">
<head>
<title></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="PhoneCat">
<!-- AngularUI Styles -->
<link rel="stylesheet" href="Content/ui-bootstrap-csp.css" />
</head>
<p>Total number of phones: {{phones.length}}</p>
<body ng-controller="PhoneListController">
<ul>
<li ng-repeat="phone in phones">
<span>{{phone.name}}</span>
<p>{{phone.snippet}}</p>
</li>
</ul>
</body>
<script src="scripts/angular.js"></script>
<script src="scripts/angular-ui/ui-bootstrap-tpls.min.js"></script>
<script src="scripts/app2.js"></script>
</html>
app2.js
// Define the `phonecatApp` module
var app = angular.module('phonecatApp', ['ui.bootstrap']);
// Define the `PhoneListController` controller on the `phonecatApp` module
phonecatApp.controller('PhoneListController', function PhoneListController($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.'
}
];
});