134
rated 0 times
[
140]
[
6]
/ answers: 1 / hits: 38832
/ 7 Years ago, tue, february 7, 2017, 12:00:00
i have this code in my script.js file
var mainController = function($scope){
$scope.message = Plunker;
};
and this is my HTML
<!DOCTYPE html>
<html ng-app>
<head>
<script [email protected] data-semver=1.6.1 src=https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js></script>
<link rel=stylesheet href=style.css />
<script src=script.js></script>
</head>
<body ng-controller=mainController>
<h1>Hello {{ message }}</h1>
</body>
</html>
i declared ng-app in the opening html tag
but i get this error on my console that mainController is not registered
More From » angularjs