【angularjs基础】ng-repeat嵌套循环报错angular.min.js:89 Error: [ngRepeat:dupes]

再写嵌套循环的时候,提示一个错误

angular.min.js:89 Error: [ngRepeat:dupes]

代码如下

<table class="GridViewTable mtop5px " style="margin-top: 15px;" id="tabVipHallRegisterList" ng-app="" ng-controller="JSJ.CRM.AppFeedBackList.RequestData">
        <tr class="text_center">
            <th style="width: 60px">编号</th>
            <th style="width: 80px">会员姓名</th>
            <th style="width: 80px">手机号</th>
            <th style="width: 150px">反馈内容</th>
            <th style="width: 80px">反馈时间</th>

            <th style="width: 80px">公司</th>
            <th style="width: 80px">问题类型</th>
            <th style="width: 80px">上传图片</th>

            <th style="width: 80px">消息类型</th>
            <th style="width: 90px">消息来源</th>
            <th style="width: 150px">答复内容</th>
            <th style="width: 80px">答复时间</th>
            <th style="width: 100px">反馈奖励</th>
            <th style="width: 50px">操作</th>
        </tr>
        <tr class="text_center" ng-repeat="x in AppFeedBackList | orderBy:orderProp">
            <td ng-bind="x.CommentsID"></td>
            <td ng-bind="x.CustomerName"></td>
            <td ng-bind="x.Telephone"></td>
            <td ng-bind="x.CommentsS" onclick="ShowDetailContent(this)" onmouseover="ShowDetailContent(this)" @*onmouseout="layer.closeAll();"*@ detailcontent="{{x.Comments}}"></td>
            <td ng-bind="x.CreateTime"></td>

            <td ng-bind="x.QuestionSourceFromDsec"></td>
            <td ng-bind="x.QuestionTypeDsec"></td>

            <td>
                <span ng-repeat="i in x.ListImageUrl">
                    <img src="{{i}}" style="width:45px;height:45px;" onclick=‘ShowImage(this)‘ url="{{i}}" />
                </span>
            </td>

            <td ng-bind="x.MessageType"></td>
            <td ng-bind="x.SourceWay"></td>
            <td>
                <input ng-if="x.IsReply" type="button" p="{{ x.CommentsID }}" style="width:50%;" comments="{{x.Comments}}" jsjid="{{x.JSJID}}" value="答复" name="btnReply" />

                <label ng-if="!x.IsReply" onclick="ShowDetailContent(this)" onmouseover="ShowDetailContent(this)" @*onmouseout="layer.closeAll();"*@ detailcontent="{{x.ReplayContent}}">{{x.ReplayContentS}}</label>
            </td>
            <td ng-bind="x.ReplayTime"></td>
            <td>
                <input ng-if="x.IsTake" type="button" name="btnReward" p="{{ x.CommentsID }}" style="width:50%;" comments="{{x.Comments}}" jsjid="{{x.JSJID}}" value="奖励" />
                <label ng-if="!x.IsTake">{{x.RewardTips}}</label>
            </td>
            <td>
                <input type="button" name="btnDel" style="width:80%;" p="{{ x.CommentsID }}" value="删除" />
            </td>
        </tr>
    </table>

报错截图

跟踪原因

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

解决方案

在对应的ng-repeat指令中增加track by $index

修改代码

<td>
                <span ng-repeat="i in x.ListImageUrl track by $index">
                    <img src="{{i}}" style="width:45px;height:45px;" onclick=‘ShowImage(this)‘ url="{{i}}" />
                </span>
            </td>

最后可以在同一行,生成多个图片标签

搞定!

时间: 2024-10-05 06:44:25

【angularjs基础】ng-repeat嵌套循环报错angular.min.js:89 Error: [ngRepeat:dupes]的相关文章

angular2 ng build --prod 报错:Module not found: Error: Can&#39;t resolve &#39;./$$_gendir/app/app.module.ngfactory&#39;

调试页面 ng serve 正常 ng build 也正常 ng build --prod 异常:Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' 开始以为是以前那样,引用错了路径或少引用了东西. 搜了好多资料,发现是 angular-cli 的版本有点低了(因为用了最新的material) 找到原因了,问题就很容易解决了 第一步: rm -rf node_modules/ 第二部: npm

angular min js 118 Error ng areq http //errors angularjs

1.错误描述 angular.min.js:118 Error: [ng:areq] http://errors.angularjs.org/1.5.8/ng/areq?p0=username&p1=not%20a%20function%2C%20got%20undefined at Error (native) at http://127.0.0.1:8020/AngularJS/js/angular.min.js:6:412 at sb (http://127.0.0.1:8020/Angu

angular.min.js:118 Error: [ng:areq] http://errors.angularjs.org/1.5.8/ng/areq?

1,错误如图所示 简单说下错误原因是:没有js没有注册进去. 解决方法: 1.看下index.html有没有引入你的js文件. 2.看下app.js有没有注册js,比如我这次就是这步没做好,合并代码时冲掉了.如图 在后面加上丢失的invoidFolder.controllerrjs就好了.希望对别人有帮助 原文地址:https://www.cnblogs.com/qianyy/p/10485230.html

angularJS (2) angular.min.js

angular.min.js /* AngularJS v1.2.29 (c) 2010-2014 Google, Inc. http://angularjs.org License: MIT*/(function(V,W,v){'use strict';function z(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.a

npm run dev报错,events.js:160 throw er; // Unhandled &#39;error&#39; event

错误代码如下: [email protected] dev E:MySoftwaretestGitwebpackvue-projectnode build/dev-server.js "8088" events.js:160 throw er; // Unhandled 'error' event ^ Error: listen EACCES 0.0.0.0:8080 at Object.exports._errnoException (util.js:1026:11) at expo

【Unity3D】生成工程报错解决—UnityEditor.HostView:OnGUI() Error building Player: Couldn&#39;t build player because of unsupported data on target platform.

错误 错误1:An asset is marked as dont save, but is included in the build: unityEditor.HostView:OnGUI() 错误2:Building - Failed to write file: sharedassets0.assetsUnityEditor.HostView:OnGUI() 错误3:Error building Player: Couldn't build player because of unsup

webpack编译报错:Module not found: Error: Cannot resolve &#39;file&#39; or &#39;directory&#39; ./../../node_modules..

在同事的mac电脑上,可以正常编译,拿到我这边就出错了(⊙﹏⊙) 好像是webpack在window下的一个bug,需要让 webpack 和你的项目保持在一个盘符下,参考. 解决方法: 修改config.js配置文件,在所有目录前加上path.join,参考1,参考2. webpack编译报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./../../node_modules..

11gR2数据库日志报错:Fatal NI connect error 12170、

11gR2数据库日志报错:Fatal NI connect error 12170.TNS-12535.TNS-00505 [问题点数:100分,结帖人MarkIII] 不显示删除回复             显示所有回复             显示星级回复             显示得分回复             只显示楼主           收藏 关注 MarkIII MarkIII 等级: 结帖率:98.94% 楼主发表于: 2011-05-13 10:33:10 Fatal NI

【Vue报错】Module build failed: Error: No parser and no file path given, couldn&#39;t infer a p arser.

在创建一个vue项目启动时报错,报错的内容为: error in ./src/App.vue Module build failed: Error: No parser and no file path given, couldn't infer a p arser. at UndefinedParserError.Wrapper (D:\dyyc\bookstore\[email protected] [email protected]\index.js:1948:14) at new Und