winjs / angular-winjs

Project to smooth the AngularJS/WinJS interaction
Other
126 stars 46 forks source link

Two way binding for selection not working in ListView #78

Open varghesep opened 8 years ago

varghesep commented 8 years ago

I asked a question in stackoverflow about a two way binding issue with the ListView.

The issue is that selecting a list item (mouse click or touch) does not set the selection variable.

devshafeeque commented 8 years ago

You have to use selection-mode="'single'" tap-behavior="'directSelect'". I have answered in SO, Pls see the JSFiddle in for example.

SO Link http://stackoverflow.com/questions/33380549

Odonno commented 8 years ago

And what if we change the content of the selection property ? For example :

selection="test"

EDIT : sorry, I just found that we need to define an array in the controller $scope.selection = [];.