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();
};
});
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.2
3
Version History
- VersionDownloads (Last 7 Days)
- 0.0.2
3
Package Sidebar
Install
npm i angular-beforeunload
Weekly Downloads