defining list in fixed html form.

6 views
Skip to first unread message

Dan Bayley

unread,
Jun 30, 2016, 1:42:45 PM6/30/16
to AngularJS
I have JSON model a bit like this :

  • Id
  • Name
  • updated
  • added
  • related items
    • item 1
    • item 2
    • item 3
    • etc

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?
Reply all
Reply to author
Forward
0 new messages