angularjs - Why do we have to initialize ng-model in controller -


i new angular realized in order use ng-model should initialize in controller. example, in index.html have:

<input type="text" name="source" ng-model="source"> 

if don't initialize in controller, won't work.

$scope.source = ''; 

can explain why?


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -