"Angularjs base" Ng-repeat nested loop error angular.min.js:89 error: [Ngrepeat:dupes]

Source: Internet
Author: User

When you write a nested loop again, you are prompted with an error

Angular.min.js: the Error: [Ngrepeat:dupes]

The code is as follows

<Tableclass= "Gridviewtable mtop5px"style= "margin-top:15px;"ID= "Tabviphallregisterlist"Ng-app=""Ng-controller= "JSJ." Crm. Appfeedbacklist.requestdata ">        <TRclass= "Text_center">            <thstyle= "width:60px">Number</th>            <thstyle= "width:80px">Member name</th>            <thstyle= "width:80px">Phone number</th>            <thstyle= "width:150px">Feedback content</th>            <thstyle= "width:80px">Feedback time</th>            <thstyle= "width:80px">Company</th>            <thstyle= "width:80px">Problem type</th>            <thstyle= "width:80px">Upload image</th>            <thstyle= "width:80px">Message type</th>            <thstyle= "width:90px">Message source</th>            <thstyle= "width:150px">Reply content</th>            <thstyle= "width:80px">Response time</th>            <thstyle= "width:100px">Feedback Rewards</th>            <thstyle= "width:50px">Operation</th>        </TR>        <TRclass= "Text_center"ng-repeat= "x in Appfeedbacklist | orderby:orderprop">            <TDNg-bind= "X.commentsid"></TD>            <TDNg-bind= "X.customername"></TD>            <TDNg-bind= "X.telephone"></TD>            <TDNg-bind= "X.commentss"onclick= "Showdetailcontent (this)"onmouseover= "Showdetailcontent (this)"@*onmouseout= "Layer.closeall ();"*@ detailcontent= "{{x.comments}}"></TD>            <TDNg-bind= "X.createtime"></TD>            <TDNg-bind= "X.questionsourcefromdsec"></TD>            <TDNg-bind= "X.questiontypedsec"></TD>            <TD>                <spanng-repeat= "I in X.listimageurl">                    <imgsrc= "{{i}}"style= "width:45px;height:45px;"onclick= ' ShowImage (this) 'URL= "{{i}}" />                </span>            </TD>            <TDNg-bind= "X.messagetype"></TD>            <TDNg-bind= "X.sourceway"></TD>            <TD>                <inputng-if= "X.isreply"type= "button"P= "{{x.commentsid}}"style= "width:50%;"Comments= "{{x.comments}}"Jsjid= "{{X.jsjid}}"value= "Reply"name= "Btnreply" />                <labelng-if= "!x.isreply"onclick= "Showdetailcontent (this)"onmouseover= "Showdetailcontent (this)"@*onmouseout= "Layer.closeall ();"*@ detailcontent= "{{x.replaycontent}}">{{x.replaycontents}}</label>            </TD>            <TDNg-bind= "X.replaytime"></TD>            <TD>                <inputng-if= "X.istake"type= "button"name= "Btnreward"P= "{{x.commentsid}}"style= "width:50%;"Comments= "{{x.comments}}"Jsjid= "{{X.jsjid}}"value= "Bonus" />                <labelng-if= "!x.istake">{{X.rewardtips}}</label>            </TD>            <TD>                <inputtype= "button"name= "Btndel"style= "width:80%;"P= "{{x.commentsid}}"value= "Delete" />            </TD>        </TR>    </Table>

Error

Track cause

http://blog.csdn.net/ligang2585116/article/details/50490307

Solution Solutions

Add track by $index in the corresponding ng-repeat directive

Modify Code

<TD>                <spanng-repeat= "I in X.listimageurl track by $index">                    <imgsrc= "{{i}}"style= "width:45px;height:45px;"onclick= ' ShowImage (this) 'URL= "{{i}}" />                </span>            </TD>

Finally, you can create multiple picture labels on the same line

Get!

"Angularjs base" Ng-repeat nested loop error angular.min.js:89 error: [Ngrepeat:dupes]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.