mirror of
https://github.com/Febbweiss/CloudBudget-AngularJS.git
synced 2026-03-04 22:35:38 +00:00
Clean: unused function
This commit is contained in:
@@ -13,27 +13,8 @@
|
||||
service.success = success;
|
||||
service.error = error;
|
||||
|
||||
initService();
|
||||
|
||||
return service;
|
||||
|
||||
function initService() {
|
||||
$rootScope.$on('$locationChangeStart', function() {
|
||||
clearFlashMessage();
|
||||
});
|
||||
|
||||
function clearFlashMessage() {
|
||||
var flash = $rootScope.flash;
|
||||
if( flash ) {
|
||||
if( !flash.keepAfterLocationChange ) {
|
||||
delete $rootScope.flash;
|
||||
} else {
|
||||
flash.keepAfterLocationChange = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function success(message, keepAfterLocationChange) {
|
||||
growl.success(message,{title: 'Success!'});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user