I am new in Angular.js
and start learning angular on plunker.co
. The problem is when I use ng-controller
in any tag of html
page , angular
stops working. I mean {{ 4+4 }}
display as it is just after the using of ng-controller
.
this is code from Plunker.co
<html ng-app>
<head>
<script data-require="angular.js@1.3.15" data-semver="1.3.15"
src="https://code.angularjs.org/1.3.15/angular.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body ng-controller="MainController">
<h1>Hello Plunker!</h1>
{{8*8}}
{{message}}
</body>
</html>
without ng-controller
it displays 64
as output but with ng-controller
is displays as it is like {{8*8}}
. why it is happening. Please give some advice. thnks in advance. :)
script.js
var MainController = function($scope){
$scope.message = "Hello World!";
}
edited
Now message
attirbute value is not displaying on page.