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

Can we close or remove the notification ? #136

Open Kalmuraee opened 6 years ago

Kalmuraee commented 6 years ago

Hi

Do we have a built in function to close or remove the current notification ? I'll post my findings here if I have found any solution .

Kalmuraee commented 6 years ago

I've managed to trigger the conditional closing through adding a condition on "closeEvent" function

if(e.srcElement.id === "actionTaken"){ // The rest of closing function is here } and assigning id="actionTaken" to the buttons where you want to close.

Make sure that closeOnClick is true

If there's a better way , please let me know. Regards,