Accessing the nested Arrays using ng-repeat in angularjs

前端 未结 1 358
别那么骄傲
别那么骄傲 2021-01-02 23:09

JSFiddle

I\'m not able to access the array images in the nested collection. Why am I not able to see any output?

The model:

var obj = [{
            


        
相关标签:
1条回答
  • 2021-01-03 00:05

    The problem is you are trying to repeat a list of li elements inside of a li element, which is invalid HTML. As such, angular will not render this.

    Update your HTML to:

    <ul>
        <li ng-repeat="img in item"> 
            <ul>
                <li ng-repeat="img1 in img.images">{{img1}}</li>
            </ul>
        </li>
    </ul>
    
    0 讨论(0)
提交回复
热议问题