Recursion with ng-repeat in Angular

前端 未结 10 1278
心在旅途
心在旅途 2020-12-15 19:17

I have the following data structure for items in my sidemenu, in an Angular app based on a paid-for web site theme. The data structure is my own, and the menu is derived fro

10条回答
  •  甜味超标
    2020-12-15 19:54

    You can achieve this simply by including a javascript template and template include using ng-include

    define javascript template

    
    

    and include it like:

    Example: In this example I used basic html without any class you can use classes as you need. I just shown basic recursion structure.

    In html:

    
    
    
    
    

    PLUNKER DEMO

提交回复
热议问题