jsFiddle Example: Recursive AngularJS Templates
- July 14, 2014 8:18 AM
- Comments (0)
This is a variation on a previous example, but I was recently asked how to generate HTML for tested items with AngularJS. This process is simple: create a fragment that represents the repeating element and then use ng-include and careful reference naming to create the recursion.
Make sure that the name of data reference is the same in the template, the recursion, and the initiating location (child in this example).