increment-index-value-by-angularjs-in-ng-repeat

1,377 views
Skip to first unread message

vi...@biginfolabs.com

unread,
Nov 27, 2014, 6:52:39 AM11/27/14
to ang...@googlegroups.com
Hi folks,

I want to increment index value by 20. According to code, it can only increase 1. Can anyone please tell me how to solve it using angularjs. or I can use some javascript variable and increase? I dont know how to achieve it.


    <td style="vertical-align: top; position:relative; left:{{$index}}" ng-repeat="risks in valuesAtRiskValues" >
                <div style="vertical-align: top;" class="flip-container" id="" onClick="valuesAtRisk(this)">
                    <div class="flipper">
                        <div class="valuesAtRisk">                               
                            <div class="varLabel"><span>{{risks.riskType}}</span></div>
                            <div id="flipTop">
                                <div class="valuesAtRiskH">{{risks.riskValueTrimmed}}</div>
                                <div class="varIndicator UP"></div>
                                <div class="varSubHeading">{{risks.riskTitle}}</div>
                            </div>
                        </div>
                       
                       
                    </div>
                </div>
            </td>

All <td>'s are almost overlapping. I want to put it side by side.

-Vivek

Vivekanand Ittigi

unread,
Nov 27, 2014, 7:00:58 AM11/27/14
to ang...@googlegroups.com
I got the answer for this.. Use this

<td style="vertical-align: top; position:relative; left:{{$index * 125}}" ng-repeat="risks in valuesAtRiskValues" >

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/w2tJqRaq2wk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages