vendredi 11 septembre 2015

Angularjs recursive directive

I am trying to write a recursive directive. I have seen this thread: Recursion in Angular directives

It works when you put the recursive directive under ul-li but goes into infinite loop with a table-tr

<table> 
  <tr>
    <td>{{ family.name  }}</td>
  </tr>
  <tr ng-repeat="child in family.children">
    <tree family="child"></tree>
  </tr>
</table>

Here is a plunker : http://ift.tt/1LnI4Uo

EDIT: I am not trying to build a tree directive.In my recursive directive I have to use table and tr tags.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire