I have JSON model a bit like this :
- Id
- Name
- updated
- added
- related items
Normally I might use an ng-repeat for related items which is easy.
In this case I need to populate a pre-designed html form.
each related item has an ID . there is no guarantee the related items will be in the correct order.
The HTML form knows which ID belongs where.
If there are no related items then completing the form and pressing save will need to add these relatedItems to the model.
I've tried to illustrate this below :
How can this be achieved keeping the controller / model the same?