ui.bootstrap指令总是出现multidir错误

时间:2014-07-26 05:37:06

标签: angularjs angular-ui-bootstrap

当我尝试使用ui.bootstrap的指令(如$ modal和$ datepicker)时出现此错误。

Error: [$compile:multidir] Multiple directives [datepickerPopup, datepickerPopup]  asking for new/isolated scope on: <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close">
http://errors.angularjs.org/1.2.19/$compile/multidir?p0=datepickerPopup&p1=…ate%2C%20mode)%22%20ng-required%3D%22true%22%20close-text%3D%22Close%22%3E
at VALIDITY_STATE_PROPERTY (http://172.21.101.123/user/lib/angular/angular.js:78:12)
at assertNoDuplicate (http://172.21.101.123/user/lib/angular/angular.js:6889:15)
at applyDirectivesToNode (http://172.21.101.123/user/lib/angular/angular.js:6281:13)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5976:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15)
at compileNodes (http://172.21.101.123/user/lib/angular/angular.js:5988:15) 

这是我的代码(html)。

<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
<span class="input-group-btn">
       <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
</span>

我没有在一个标签中使用相同的命名('datepickerPopup')多个指令。

0 个答案:

没有答案