Is there a way to bind to multiple models in AngularJS?
This is the case I'm dealing with: I have a select list, whose options are composed of objects; say a person for example { id: 5, name: 'John', phone: '555' }. I want to bind the id value from the select list to an attribute on a model object. Note that I don't want to store the entire person, but just the ID value.
The issue is that later on, I'd like to be able to get a reference to the currently selected object. Currently I only have its ID value since that is what I used for binding, and I need to find the object by searching the source array.
It seems that there should be a way to bind the id value from the selected option to the model that I need to keep track of, as well as to another place that keeps track of the entire reference. Is anything like this possible?