Novice query:
I am facing an issue with a simple input type=text
element linked to ng-model="xyz.zyx"
, where xyz
refers to an object. In my controller, I initialize this object and set the value for the property zyx
as shown below:
xyz {
zyx: $scope.zzz
}
The strange part is that there are no input fields on the page using ng-model="zzz"
, but somehow, the value of zyx
is being assigned to the value of the input field defined initially with ng-model="xyz.zyx"
.
Why is this happening? What is the source of $scope.zzz
?