I am learning angularJS, ng-app
works ng-model
works, but when I try ng-controller
, it does not work, the fault is on my side but I am unable to figure out what it is, I am not even trying anything fancy, just trying make the ng-controller work,
what is my mistake in the below code?
HTML :
<div ng-app="">
<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1>
</div>`
and JS :
function HelloWorldCtrl($scope){
$scope.helloMessage="Hello World";
}
same problem when run in jsfiddle