javascript - ng-repeat recursive loop crashes the browser -


okay have following directive:

    app.directive("menuitem", function() {     return {         restrict : "e",         templateurl: 'tpl/directives/menu-item.html',         scope: {             category: '='         },         link: function(scope,element, attr){          }     }; }); 

this being called such:

top level

    <!-- list --> <ul class="nav" ng-controller="navcontroller">     <menu-item ng-repeat="category in categories" category="category"></menu-item> </ul> <!-- / list --> 

menu-item.html

    <li>     <a href="" class="auto" ng-if="category.subcategories.length > 0">           <span class="pull-right text-muted">             <i class="fa fa-fw fa-angle-right text"></i>             <i class="fa fa-fw fa-angle-down text-active"></i>           </span>         <span>{{category.name}}</span>     </a>     <a ui-sref="app.ui.googlemap" href="#/app/ui/googlemap" ng-if="category.subcategories.length <= 0">         <span>{{category.name}}</span>     </a>     <ul class="nav dker" ng-if="category.subcategories.length > 0">         <menu-item ng-repeat="cat in category.subcategories" category="cat"></menu-item>     </ul> </li> 

there no console errors basicly crashes before can console up.

can tell me how fix this?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -