我试图在$ mdDialog上按下按钮时向父控制器发送信号。我不想使用广播。我怎样才能做到这一点?使用AngularJS 1.7
我尝试过:
$mdDialog.show(confirm).then(function () {
testService.startTest()
.then(function (response) {
console.log(passData);
});
});
self.showTestDialog = function (event) {
$mdDialog.show({
controller: 'dialog.test.controller',
controllerAs: '$ctrl',
templateUrl: '/testr.template.html',
parent: angular.element(document.body),
targetEvent: event,
clickOutsideToClose: true
});
};