Add a timeout to clear message automatically feature#5
Conversation
|
I like this feature UP |
|
Hey, I've done "auto hide" flash messages before with ngAnimate and CSS. So I quickly put this plnkr together to demonstrate http://embed.plnkr.co/y1INk36bPbW7GaX15QbQ/preview Regarding including html messages, that's a nice feature. I'm just going to double check how to make it work with the latest version of angular's SCE. If I'm not mistaken if you don't include ngSanitize in your project and are using ng-html-bind-unsafe, angular renders nothing. Would you mind double checking this as well? And perhaps send another pull request, so we could split this one? Cheers, |
|
By the way, for the sake of knowledge sharing, if you wanted html as flash messages to be able to add something like bootstrap icons: #loading-messages .error:before,
#loading-messages .warning:before,
#loading-messages .info:before,
#loading-messages .success:before {
display: inline-block;
width: 1em;
font-family: 'FontAwesome';
margin-right: 4px
}
#loading-messages .error:before { content: '\f057'; }
#loading-messages .warning:before { content: '\f071'; }
#loading-messages .info:before { content: '\f06a'; }
#loading-messages .success:before { content: '\f058'; }Cheers, |
|
@map7 that is exactly what i was looking for. @gtramontina thanks for sharing those CSS snippets, i want do close my flash message using this. |
|
@luisfdeandrade you're saying you +1 the pull request or using CSS only (http://embed.plnkr.co/y1INk36bPbW7GaX15QbQ/preview) satisfy your needs? Or were you talking about the FontAwesome icons? EDIT: you're welcome anyway. :-) |
|
+1 for timeout. Otherwise it seems not possible to clear the flash-messages |
|
i just added to my directive template and worked fine, using same structure like twitter bootstrap. |
I needed a feature which would clear the messages after so many seconds when creating a new flash message.