This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
ng-model not working with a simple variable on $scope #18
Closed
Description
Inside demo.html
, if you replace ng-model="data.custom"
:
<ui-select ng-model="data.custom">
...
</ui-select>
by ng-model="myItem"
:
<ui-select ng-model="myItem">
...
</ui-select>
$scope.myItem
never gets set.
It's like ngModelCtrl.$setViewValue(newVal)
cannot bind to a simple variable $scope.myItem
.
It will work only if ng-model
is an object:
demo.js
:$scope.myItem = {}
demo.html
:ng-model="myItem.data"
I could not figure out why, any idea?
Metadata
Metadata
Assignees
Labels
No labels