Closed sistemanick closed 9 years ago
Hmm. Currently this is doable by
msg = growl.info('Hello...');
growlMessages.deleteMessage(msg);
However, it might be nice to have a more direct approach that you've got above.
@flippinjoe21 Thanks. I tried your suggestion but getting "cannot read property 'messages'" error.
I've set up a plunk here: http://plnkr.co/edit/1HqDTKl6cj5Yrqp7TDT5?p=preview
Another cool thing would be to enable cleaning up all current growls with something like growl.dismissAll()
The use case: I change state from the login
state to the home
state. I failed to enter the right password once before the change state so I have a growl saying that my password of login in incorrect. Once I enter correctly my password and get to the home state, I want to clean all error growls that might be displayed.
So after taking a more in depth look. I've found that both of these are already in there.
For a single message you can destroy manually by
var msg = growl.info('blah');
msg.destroy();
For multi-messages you can do
growlMessages.destroyAllMessages();
There was a potential issue around this not working if you did not have <div growl>
linked into your linked into your html yet. But I believe that is now resolved in the latest v0.7.5.
Closing for now
Thanks 0.7.5 fixed it.
Is it possible to close messages manually? For e.g.