我需要一些帮助。我需要一个确认框并使用引导程序或它根本不起作用。我在下面解释我的代码。
<div class="right_panel" ng-controller="NABH2Controller">
<div class="smbtn btn" data-toggle="confirmation" data-placement="top"><i class="fa fa-check" aria-hidden="true" ng-click="openCOnfirmation()"></i></div>
</div>
var app=angular.module('demo');
app.controller('NABH2Controller',function($scope,$http){
$scope.openCOnfirmation=function(){
$('[data-toggle=confirmation]').confirmation();
}
})
此处当用户点击icon
时,应该打开确认框,但在我的情况下,我收到以下错误。
TypeError: this.getUID is not a function
at Confirmation.init (bootstrap-confirmation.js:151)
at new Confirmation (bootstrap-confirmation.js:16)
at HTMLDivElement.<anonymous> (bootstrap-confirmation.js:427)
at Function.each (jquery.js:2)
at m.fn.init.each (jquery.js:2)
at m.fn.init.$.fn.confirmation (bootstrap-confirmation.js:419)
at n.$scope.openCOnfirmation (NABH2Controller.js:53)
at fn (eval at compile (angularjs.js:212), <anonymous>:4:239)
at f (angularjs.js:252)
at n.$eval (angularjs.js:132)
请帮我解决此错误,此确认框应该有效。