javascript - Angularjs appending templates to each other -


how append code existing <div ng-view> container.

like have template following code:

<p>{{date}}</p> <div ng-repeat='i in items'>     <span>{{i.created}}</span>     <span>{{i.order}}</span>     <span>{{i.customer}}</span> </div> 

then ajax loading next date items , on..so how make templates append in end, not replace each other , like:

2013-05-03  created order customer  created order customer  created order customer  2013-05-04  created order customer  2013-05-05  created order customer  created order customer 

and on.. ?

thank in advance.

you need create parent ng-repeat follows:

<div ng-repeat="entry in invoices">     <p>{{entry.date}}</p>     <div ng-repeat='i in entry.items'>         <span>{{i.created}}</span>         <span>{{i.order}}</span>         <span>{{i.customer}}</span>     </div> </div> 

thus, when server loading next date items, add same invoices array.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -