Dmitry Dmitry - 6 months ago 53
AngularJS Question

Filling the table in a loop

How to fill a table in the loop?
I have an array of values, and I want to automatically fill in the table.

<div ng-repeat="n in range" >
<th> {{[n]}} {{vm.symbal}}
{{[n].humidity}} %

And script:

var range = [];
for(var i=0;i<7;i++) {
$scope.range = range;


you do not need to create a range array, just iterate your list:

    <th>Day temp</th>
  <tr ng-repeat="item in">
    <td ng-bind=""></td>
    <td ng-bind="vm.symbal"></td>
    <td ng-bind-template="{{ item.humidity }} %"></td>