Is it possible to use ng-model to gradually build an object across multiple views?
For example, in view1 I have
<input ng-model='myObject.firstName'>
And in view2 I have
<input ng-model='myObject.lastName'>
And in view3 I have
<input ng-model='myObject.email'>
The concept is that you could click a submit button in the final view and send the object somewhere.
My initial approach is to create a service that initializes an empty object, then have functions within the service that allow controllers using the service to add their view input to the object and return it. However, I feel like this method is somewhat indirect!
If anyone has suggestions on a better approach, I would greatly appreciate it.