Still training myself to think In angularian...
I think that it would it be correct if I think of the ng-model attribute as a reference to some data element in some parent scope... [would it?]
I am trying to understand to which scope will an ng-model
point to...
So basically if I have something like:
<body ng-app="myApp">
<input ng-model="name">
{{name}}
</body>
the data for name
would be part of the scope set up by the ng-app (as it is the only scope available?
What would happen if I will wrap the input with a <div ng-scope>
? On which scope would it then be stored?
Can expect the binding to stop working because the name would then be stored on the scope for this div?
and finally what would happen if I add would change it further to look like this:
<body ng-app="myApp" ng-model="name">
<div ng-scope>
<input ng-model="name">
</div>
{{name}}
</body>
What is the process used to resolve on which scope will the data for a ng-model be stored?