An AngularJS module that gives you access to the browsers local storage with cookie fallback
Hi all! I've got a silly question. I hope it works or there maybe is a way to fix around this.
I want to set in the config how growl messages are handled.
I want the user the dynamically to be able to set if a growl message needs to clicked away by the user itself or that a delay of 5000ms should be used.
I need to do this in the config of Angular and i cannot inject "localStorageService" only the "localStorageServiceProvider".
.config(['NotificationProvider', 'localStorageServiceProvider', 'localStorageService',
function (NotificationProvider, localStorageServiceProvider, localStorageService) {
localStorageServiceProvider
.setPrefix('pip')
.setStorageType('sessionStorage');
localStorageService.set('growlNotificationSettings', {
delay: null,
X: 'right',
Y: 'top'
});
var growlNotificationSettings = localStorageService.get('growlNotificationSettings');
NotificationProvider.setOptions({
delay: growlNotificationSettings.delay,
startTop: 20,
startRight: 10,
verticalSpacing: 20,
horizontalSpacing: 20,
positionX: growlNotificationSettings.X,
positionY: growlNotificationSettings.Y
});
}])