angularjs - Irregular repetitions in table using JavaScript and Angular.JS -
i iterate on data this:
<table> <tr ng-repeat="(k,val) in items"> <td>{{k}} {{val.style}}</td> <td ng-repeat="(k2, item) in val.items">{{item.title}}</td> <td>{{item.ingredients}}</td> <-- (a) <td>{{item.moreinfo}}</td> <-- (b) </tr> </table>
(a) , (b) [and c, d, e...] use object "item in val.items", {{item.ingredients}} not valid expression there, because out of <td>
object want use create more columns.
example of like: http://jsfiddle.net/yj7xopgy/
is there way that?
use ng-repeat-start
, ng-repeat-end
.
<td ng-repeat-start="(k2, item) in val.items">{{item.title}}</td> <td>{{item.ingredients}}</td> <td ng-repeat-end>{{item.moreinfo}}</td>
Comments
Post a Comment