alexcrack / angular-ui-notification

Angular.js service providing simple notifications using Bootstrap 3 styles with css transitions for animating
MIT License
536 stars 169 forks source link

Feature request: click handler #52

Closed nstohler closed 8 years ago

nstohler commented 8 years ago

Our use case calls for a notification item that can be clicked on and then would call a function in our code (to show more details about the item using ngDialog). I tried adding ng-click handlers in the template, but the code never got called. It would be great if we could pass in some arguments in some way of course!

Valkendorm commented 8 years ago

+1 for this

However, I actually just did a test by using angular-bind-html-compile and customized the default template with this directive and it worked.

shashvattrip commented 8 years ago

+1 on this. Would definitely be very helpful.

mechdrew commented 8 years ago

This is already possible without any modification, but it requires a new scope to be added to the notification. I made a plunk to demonstrate how this can be accomplished; the scope can either be created as in the example, or using $rootScope if necessary.

alexcrack commented 8 years ago

Added by 7e2fc4ffda24f5150700bbd7a88fa1846631d9f2