Closed JanStevens closed 10 years ago
+1 for everything, but specially 2. Optional setting a title attribute along with the message
Also another request: It would be good to be able to set notifications from the html directly with directives, like this:
<!-- The growl-notification directive supports HTML markup -->
<div growl-success ng-if="formHasBeenSubmitted">
<strong>Thank you {{firstName}}</strong>, we will contact you shortly.
</div>
I'm a bit against this request mainly because it defeats the purpose of the growl notifications. It is better to change this logic to your javascript instead of placing it in the template.
You could easily add an onSuccess function to your $resource request that will send the growl notification. (and an onError for the error growl)
As far as 2. and 3. are concerned, that's kinda what Angular Toaster does. It has a Title and icon. Maybe looking at the css can give u a beachhead!
Cheers and thx for keeping that plugin alive!
Current status:
I also added icons (can be disabled). I plan on releasing v0.6 this week when the site (with demo and options) is finished.
Testing and feedback, always welcome
After some thoughts, here are the new proposed features:
First one is more of a proof of concept, I have the basics down and should be fun to use it. Planning on adding a native fall back method if the user does not grant access for the notifications or they are not supported.
Second feature allows for an optional title attribute along with the message. You could do the same using
<h4></h4>
tags but this requires enabling HTML. Another point is that native notifications also have a title field (they even have an icon field).Third feature, I think there are many cases where people would like to change the template of the notification (adding own classes or adding extra stuff), editing the template right now requires overwriting the source code.
Final feature, don't know if it is possible but different templates could be used as an example. Depends if I'm in the mood for CSS'ing
Any other requests are also welcome!