I have 3 files: EventDetails.html
, app.js
, and EventController.js
.
Here is the body of the html
<html ng-app="eventsApp">
<head>...</head>
<body>
<div class="container">
<div ng-controller="EventController">
{{event.name}}</div>
</div>
</body>
</html>
app.js:
var eventsApp = angular.module('eventsApp', []);
EventController.js:
eventsApp.controller('EventController',
function EventController($scope) {
$scope.event = {
name: 'Angular',
date: '2/23/16',
time: '11:22 am'
};
});
when I run it, the view displays "{{event.name}}"
and not "Angular"
.
If everything looks like it should work, then I probably have an issue with my links in html to the JS pages.
Here it is in Plunker http://plnkr.co/edit/T7Hexx9GEbp63eDxwCLE?p=preview
ng-app="eventsApp"
either