JanStevens/angular-growl-2

Set globalTimeToLive by severity

Closed this issue · 3 comments

It would be nice to set globalTimeToLive by severity.

Something like
growlProvider.globalTimeToLive(2000, 'success');
growlProvider.globalTimeToLive(0, 'error'); // 0 meaning the need to close using close button

Ha wonderful idea, I'll look into it

I think a better syntax would be,

growlProvider.globalTimeToLive(2000) for a global setting (like now, backward compatible)
growlProvider.globalTimeToLive({error: 0, success: 2000, warning: 2000, info: 5000}) where possible values can be left out, the default (null) would be applied.

Great, thanks