我正在使用角材料。我正在使用 $mdDialog 在我的应用程序上创建一个弹出窗口。一切正常,除了 $mdDialog.hide() 不工作。
$ctrl.footerModal = function () {
$mdDialog.show({
template: '<md-dialog aria-label="Privacy Policy">' +
'<md-dialog-content>' +
'<div class="md-dialog-content">' +
'<h2>Privacy Policy</h2>' +
'<p> sum has been the industrys standard dummy text ever since the 1500s, when an unknown printer ' +
'took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, ' +
'but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s ' +
' with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desk</p>' +
'<p>' +
'</div>' +
'</md-dialog-content>' +
'<md-dialog-actions layout="row">' +
'<span flex>' + '</span>' +
'<md-button ng-click="$ctrl.cancel()">' +
'Ok' +
'</md-button>' +
'</md-dialog-actions>' +
'</md-dialog>',
parent: angular.element(document.body),
clickOutsideToClose: true
});
$ctrl.cancel = function () {
$mdDialog.hide();
};
}
谁能告诉我我在这里做错了什么