d.setclass不是ngMessages模块中的函数

时间:2016-09-05 08:38:03

标签: angularjs

在我的一个angularjs页面中,我使用ngMessages模块进行表单验证。在加载该页面时,我在控制台中遇到了以下错误。

" angular.js:9400TypeError:d.setClass不是函数     在渲染(angular-messages.js:413)"

不知道为什么。任何帮助将不胜感激。

这是HTML



 <div class="extranet-content">
    <div class="container-list">
        <form name="personalForm" ng-submit="personalForm.$valid && saveUsers()" novalidate>
            <div class="list-header" ng-show="all_users.length > 0">
                <div class="row">
                    <div class="col-xs-1"></div>
                    <div class="col-xs-1">
                        <h3>
                            Id
                        </h3>
                    </div>
                    <div class="col-xs-3">
                        <h3>
                            Name
                        </h3>
                    </div>
                    <div class="col-xs-3">
                        Login
                    </div>
                    <div class="col-xs-2">
                       Sign
                    </div>
                    <div class="col-xs-2">
                       password
                    </div>
                    <div class="col-xs-12">
                        <div class="border"></div>
                    </div>
                </div>
            </div>
            <div class="list-content" ng-class="{ 'noHeader' : !all_users.length }">
                <div class="row" ng-show="saveErrors.length > 0" ng-repeat="error in saveErrors track by $index">
                    <div class="col-xs-12">
                    </div>
                    <div class="col-xs-12"></div>
                </div>
                <div class="row clearfix"
                     ng-repeat-start="user in all_users = (users | filter: searchUser) | orderBy : predicate:reverse track by $index"
                     ng-class="{ 'marginTop' : $first}">
                    <div class="col-xs-1">                     
                    </div>
                    <div class="col-xs-1"></div>
                    <div class="col-xs-3">                    
                    </div>
                    <div class="col-xs-3">
                        <input type="text" name="txtLogin" id="txtLogin_{{$index}}" ng-model="user.Login">
                    </div>
                    <div class="col-xs-2">
                        <ng-form name="signForm">
                            <input maxlength="7" type="text" name="txtSign" id="txtSign_{{$index}}" ng-model="user.Sign"
                                   required>
                            <span ng-messages="listFormSubmitted && signForm.txtSign.$error" role="alert" class="error">
                                <span ng-message="required">required</span>
                            </span>
                        </ng-form>
                    </div>
                    <div class="col-xs-2"></div>
                </div>
                <div class="row group" ng-repeat-end>
                    <div class="col-xs-12" ng-if="!$last">
                        <div class="borderBottom"></div>
                    </div>
                </div>
              </div>
        </form>
    </div>
</div> 
&#13;
&#13;
&#13;

0 个答案:

没有答案