ng-model is not getting changed in ui-select

后端 未结 9 674
太阳男子
太阳男子 2021-01-17 08:45

I\'m trying to achieve something very straightforward:


    {         


        
9条回答
  •  被撕碎了的回忆
    2021-01-17 09:02

    I had a similar issue with angular 1.3.14 and ui-select and a multiple-choice ui-select directive binding to an array. I was not able to bind the selected items to an array referred to in ng-model. I got it to work by wrapping selectedItems into an object:

    $scope.myObj = { selectedItems : []};
    ...
    
    
    
    

    Putting selectedItems directly on the $scope didn't work for me.

提交回复
热议问题