angular-beforeunload
0.0.2 • Public • Published angular-beforeunload
Confirm dialog pop up if they try and (or accidently click away from) the page.
angular.module('YOUR_APP', [
'angular-beforeunload'
])
.controller('MainCtrl', function(BeforeUnload) {
var onbeforeunload = $scope.$on('$locationChangeStart', BeforeUnload.init('TOP_MESSAGE', 'BOTTOM_MESSAGE'))
$scope.submitPage = function() {
onbeforeunload();
};
});
Readme
Keywords
nonePackage Sidebar
Install
npm i angular-beforeunload
Weekly Downloads