Please excuse my ignorance but I am new in angularjs, I want to display a popup that has 2 buttons (OK and Cancel) OK : close the popup and the browser Cancel : close the popup
I am using modal-dialog to display the popup My html code is :
<modal-dialog show='dialogShown' dialog-title='My Dialog'>
<p></p>
<p>Are you sure ?</p>
<button ng-click="closeWindow()">OK</button>
<button ng-click="closeDialog()">Cancel</button>
</modal-dialog>
My controller :
var app = angular.module('MyModule', []);
app.controller('MyCtrl', function ($scope,myservice) {
$scope.dialogShown = false;
$scope.showDialog = function(){
$scope.dialogShown = true;
}
$scope.closeWindow = function(){
// I need to close the popup AND the window
}
$scope.closePopup = function(){
// I need to close the popup
}
}
Thanks in advance for your help.