JanStevens / angular-growl-2

growl-like notifications for angularJS projects
MIT License
285 stars 97 forks source link

Support for HTML and directives #3

Closed gunta closed 10 years ago

gunta commented 10 years ago

Hi, right now I need to use directives inside a notification and it doesn't work because $sce.trustAsHtml is not supposed to work with directives (see here).

Current code:

growl.error('<h4>WebSocket</h4>' + gettext('Reconnecting...') + '<refresh-button></refresh-button>', {ttl: 10000})

Where <refresh-button> is a custom directive.

One of the ways I can see solving this is by adding a declarative API like this one, any other way?

JanStevens commented 10 years ago

Hello,

I see two possible options. In upcoming 0.6 you will be able to change the growl template yourself (And so adding your refresh-button directive in the template after a message). Ofcourse this will mean that every growl notification has the refresh button (I think not an ideal situation)

Another solution is to use the angular-growl-notification directive. It seems that it supports almost the same features as this project, maybe merging the two projects will be beneficial to everyone.

gunta commented 10 years ago

Hi,

Yes, the projects are so similar that at first I had to look closely to spot the differences and angular-growl-2 looked more featureful. Merging both similar projects (or backporting the same features) will definitely benefit the community as a whole (one less library to consider when doing library-shopping, and also more community members focused on contributing to the project).

JanStevens commented 10 years ago

I'll first pull out a new version 0.6 and after that work on integrating them both

gunta commented 10 years ago

Any update on this?