0

so I have code like this:

<div class="row" ng-repeat='days in calCtrl.series track by $index'>
    <div class="cell" ng-repeat='day in days'>
        <h4>{{ $index + 1 }}</h4>
        <img ng-src="{{ day.imgUrl }}">
        <h5>{{ day.date }}</h5>
        <span>{{ day.description }}</span>
        <p ng-show='day.evaluated'>
            <img ng-repeat="x in calCtrl.range(day.stars)" ng-src='img/star.png'></p>
    </div>
</div>

And I want to do some array which will be like this:

Arr[0][0] = {{ $index+1}}
Arr[0][1] = {{day.imgUrl}}
Arr[0][2] = {{day.date}}

etc And to make it for each element "day in days". So for example if I will have 3 day in days, I want to do:

Arr[0][0]
Arr[1][0]
Arr[2][0]

How can I do this? I'm totally new in javascript :/

ozil
  • 6,930
  • 9
  • 33
  • 56
Mateusz
  • 323
  • 2
  • 11
  • 23
  • If you are totally new I would recommend reading up on Javascript to get a firm base. In regards to arrays, [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) is a good source and in general a good place to look for specific answers. Otherwise something like [Speaking Javascript](http://shop.oreilly.com/product/0636920029564.do) is a good start if you are coming from another programming language. – Jason Cust Jun 02 '15 at 14:12
  • possible duplicate of [JavaScript multidimensional array](http://stackoverflow.com/questions/7545641/javascript-multidimensional-array) – Jason Cust Jun 02 '15 at 14:14

0 Answers0