[英]ng-click not firing within ngdialog
我在NgDialog内有一个非常基本的ng-click,单击时不会触发,并且想知道任何人对问题可能有什么想法。
this.clickLocation = function () { ngDialog.open({ plain: true, controller: ['$scope', function ($scope) { console.log('hit'); }], template: '<div class="ngdialog-content">' + '<a ng-click="closeThisDialog()" class="button">Remove</a>' + '</div>' }); }
I wasn't really able to reproduce your error, but I created the following jsfiddle with everything working as expected: http://jsfiddle.net/bqbrLczc/5/ 我确实无法重现您的错误,但是我创建了以下jsfiddle,一切都按预期工作: http : //jsfiddle.net/bqbrLczc/5/
var myApp = angular.module('myApp',['ngDialog']);
function MyCtrl($scope, ngDialog) {
$scope.clickToOpen = function () {
ngDialog.open({
plain: true,
controller: ['$scope', function ($scope) {
console.log('hit');
}],
template: '<div class="test">'+
'<a ng-click="closeThisDialog()" class="button">Remove</a>' +
'</div>'
});
};
}
Please check if theres anything missing from your code or if you're using a old and possibly bugged version. 请检查您的代码中是否缺少任何内容,或者您使用的是旧版本,也可能是错误版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.