In my web site I am developing a simple AngularJS functionality - firing alert from a module controller. This is my code:
app1.js:
(function() {
var app1 = angular.module('myApp', []);
app1.controller('MyController', function() {
alert('Hey');
});
});
Index.html:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myApp">
<head>
<title>Angular</title>
<script src="Scripts/angular.min.js"></script>
<script src="Scripts/app1.js"></script>
</head>
<body ng-controller="MyController">
{{5 + 3}}
</body>
</html>
There result in my browser should be:
8
with an alert firing with a message "Hey", right? And what I get is only this in my browser:
{{5 + 3}}
Any ideas how to fix this?