mirror of
https://github.com/Febbweiss/CloudBudget-AngularJS.git
synced 2026-03-04 22:35:38 +00:00
Feature: add growl for notification
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
.module('cloudbudget')
|
||||
.factory('FlashService', FlashService);
|
||||
|
||||
FlashService.$inject = ['$rootScope'];
|
||||
FlashService.$inject = ['$rootScope', 'growl'];
|
||||
|
||||
function FlashService($rootScope) {
|
||||
function FlashService($rootScope, growl) {
|
||||
var service = {};
|
||||
|
||||
service.success = success;
|
||||
@@ -35,19 +35,11 @@
|
||||
}
|
||||
|
||||
function success(message, keepAfterLocationChange) {
|
||||
$rootScope.flash = {
|
||||
message: message,
|
||||
type: 'success',
|
||||
keepAfterLocationChange: keepAfterLocationChange
|
||||
};
|
||||
growl.success(message,{title: 'Success!'});
|
||||
}
|
||||
|
||||
function error(message, keepAfterLocationChange) {
|
||||
$rootScope.flash = {
|
||||
message: message,
|
||||
type: 'error',
|
||||
keepAfterLocationChange: keepAfterLocationChange
|
||||
};
|
||||
growl.error(message, {title: 'Error!'});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user