How do I bind the same data to different options using angulajs?


#1

I’m trying to select data and bind it to a specific item, however once I select the data, all of my items are now bound to the selected data. How can I select specific data to each of my items.

here is my demo. http://play.ionic.io/app/cb25b106e671


#2

You have to store the day that was selected when you click the open modal.

And then just bind the selected data to a map of the day + exercise, i.e. i think the aha moment is when you realise you can:

ng-model=“somMap[someValue]”

See working version: http://play.ionic.io/app/a91b54becee8