Reputation: 368
Is it possible to repeat an couple of items and every time it gets repeated it adds something like 10 to the value X.
So lets say I have
<rect ng-repeat="a in b"
x="0" y="0" fill="#00000" width="206.2"
height="117.7"
class=" {{ a.name }} "
/>
What i want to achieve is everytime it gets repeated it adds 10 to the X value, so first one is 0 than 10 than 20 than 30..
Upvotes: 3
Views: 63
Reputation: 631
You can do like this, it can help
<rect ng-repeat="a in b"
x="{{$index * 10}}" y="0" fill="#00000" width="206.2"
height="117.7"
class=" {{ a.name }} "
/>
Upvotes: 7