Currently, I'm in the process of learning angularJS. While ng-app
and ng-model
are functioning properly, I've encountered an issue with ng-controller
. Despite my efforts, I can't seem to pinpoint where I've gone wrong. My code isn't complex, I'm simply attempting to get ng-controller
to work.
What mistake am I making in the code below?
HTML :
<div ng-app="">
<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1>
</div>`
and JS :
function HelloWorldCtrl($scope){
$scope.helloMessage="Hello World";
}
The same issue arises when running it in jsfiddle