array syntax in ngRepeat

19 views
Skip to first unread message

John McPeek

unread,
Mar 11, 2014, 11:17:34 AM3/11/14
to ang...@googlegroups.com
Hi,
 I saw somewhere an example in an ngRepeat something like "x in [1 to 10]". That is wrong, but the key was that it generated the array of all the numbers 1 to 10 so you got an array of 10 numbers. Does anyone know what that syntax is?

Thanks,

John

Sander Elias

unread,
Mar 11, 2014, 11:46:59 AM3/11/14
to ang...@googlegroups.com
Hi John,

That would be nice. I'm not aware of such a syntax tough. 
Its not that hard to do this, using an helper function. have a look at this one: http://plnkr.co/edit/XvbsQ3MBH63Q3Q1JpzEY?p=preview

Does that help you?

Regards
Sander

John McPeek

unread,
Mar 11, 2014, 1:18:41 PM3/11/14
to ang...@googlegroups.com
Sander,
 I love that. Very helpful.

Thanks,

John

P.S. I just remembered where I saw that. It was D3.


--
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/PZKJNa7egHE/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