Infinitely nested ng-repeat in an Angular directive

前端 未结 1 1532
深忆病人
深忆病人 2021-01-07 02:17

I have an object containing infinitely nested data, like the following example:

[
{
    name: \"Foo\",
    value: \"Bar\",
    sub: [
        {
            n         


        
1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 02:55

    Yes, it is possible by using inline template

    Example :

    
    

    in html

    UPDATED using Plunkr example by @alexandernst http://plnkr.co/edit/dKlrvtYH1IbQXFUEk2Wx?p=preview

    0 讨论(0)
提交回复
热议问题