I'm trying to create some kind of tree control using two ng-repeat
directives and I would like to $index them like below:
Parent1 (index value should be 0)
----- Child 1 (index value should be 1)
----- Child 2 (index value should be 2)
Parent 2 (index value should be 3)
Parent 3 (index value should be 4)
---- Child 1 (index value should be 5)
Parent 4 (index value should be 6)
----- Child 1 (index value should be 7)
----- Child 2 (index value should be 8)
----- Child 3 (index value should be 9)
----- Child 4 (index value should be 10)
Data structure is simple Array item containing child array
Like parent = [];
parent[0].childs = [];
How should I code it to get Indexes having values as above?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.