{{}} works fine, but the ng model is not there.
I am using the following html -
<body ng-app="crud"> Gray input fields will not be visible. <div ng-controller="ctrl"> <input type="text" value="sdf" ng-model="asdf"/> <h1 ng-model="asdf"></h1> <h1>{{asdf}}</h1> </div> </div> </body>
asdf is defined in this js application like this
var app = angular.module("crud", []); app.controller("ctrl", ['$scope', function($scope) { $scope.asdf="ankur"; }]);
Can someone explain why this is so?
source share