E
E
enchikiben2016-04-17 22:50:48
Angular
enchikiben, 2016-04-17 22:50:48

How to update table after adding element to object field array?

Good evening!
I display the table in the form:
Head section
-- subsection --
subsection
Head section
-- subsection --
subsection
is an array of objects (in short):

var = [{
  name:"aaa",
  child:[
    {
      name:"bbb"
    }
  ]
}]

the problem is if I add more objects to the child array, then the table is not updated, although the element itself is added (I see through debug)
How to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-04-17
Protko @Fesor

copy the object (angular.copy) and then change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question