I am new to Angular.js and start learning angular at plunker.co . The problem is that I use ng-controller in any html page tag, angular stops working. I mean the {{ 4+4 }} mapping as soon as after using ng-controller .
This is the 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 displays 64 as output, but with ng-controller displays as {{8*8}} . Why is this happening. Please give some advice. in advance. :)
script.js
var MainController = function($scope){ $scope.message = "Hello World!"; }
edited Now the message attirbute value does not appear on the page.
source share