从浏览器查看时,ng-repeat代码被注释掉 [英] ng-repeat code getting commented out when viewed from browser

查看:372
本文介绍了从浏览器查看时,ng-repeat代码被注释掉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在加载过程中,我看到范围元素$scope.docDetails具有必需的数据.

I see during load that the scope element $scope.docDetails has the necessary data.

在使用ng-repeat打印信息的视图中,我发现该信息未显示在浏览器中.

In the view when I use the ng-repeat to print info, I see that it is not displayed in browser.

<body ng-controller="documentUploadController" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">
<div class="container">
    <div ng-repeat="row in documentUploadController.docDetails">
        <div class="col-sm-2">{{row.DocumentTypeName}}</div>
        <div class="col-sm-3 elementwrap"><a href="#" ng-click="documentUploadController.downloadDocument(row)">{{row.FileName}}</a> </div>
 ..
        </div>
    </div>

当我查看HTML时,我看到ng-repeat代码被注释掉了

WHen i view the HTML ,i see the ng-repeat code being commented out

我要去哪里错了?

推荐答案

当前,您的ng-repeat变量为$scope.docDetails

Currently, your ng-repeat variable is $scope.docDetails

由于$ scope已经等于控制器,因此像<div ng-repeat="row in docDetails">

Since $scope already equals the controller, remove the controller reference in ng-repeat like <div ng-repeat="row in docDetails">

<body ng-controller="documentUploadController" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">
<div class="container">
    <div ng-repeat="row in docDetails">
        <div class="col-sm-2">{{row.DocumentTypeName}}</div>
        <div class="col-sm-3 elementwrap"><a href="#" ng-click="documentUploadController.downloadDocument(row)">{{row.FileName}}</a> </div>
 ..
        </div>
    </div>

这篇关于从浏览器查看时,ng-repeat代码被注释掉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆