How to ng-model a field on AngularJS form for the entity which has One-to-Many relationship-
For Ex;- User Entity(name, contact, addressList) has Address(flatNumber, streetAddress) entity.
User{ name: contact: Address{ flatNumber: streetAddress: } }
Now in AngularJS form for name input text i put user.name and its value is populated by setter, same for Address i put a addressList with OneToMany relationShip. so for input field flatnumber, what should i write in ng-model, Tried user.address.flatNumber but it is not retaining anything. The JSON has only primitive attributes of user class, not the dependency values.
Please suggest if there isany example i can refer for one-to-many relationship using AngularJS form