angular-notify
angular-notify copied to clipboard
Sometimes two messages are showing even after closing all the notify
This occurs only after first page loads. And another thing is, first time only two messages are showing.
After that working properly.
What will be the root cause of this issue?
Solved the issue. I don't know the root cause. But the following solved my issue. Taken the last notify instance and closed that notify specifically.
if (appServices.lastNotify && appServices.lastNotify.close)
appServices.lastNotify.close();
appServices.lastNotify = notify({
messageTemplate: msg,
classes: className,
templateUrl: 'scripts/angular-notify/angular-notify.html'
});
Sorry my solution is not worked. Please check the issue.
I had the same problem. Having for example 2 html views, one with angularControllerA, and other with angularControllerB, when I make a notification on angularControllerB, I saw just 1 notification, but if I exit back to angularControllerA, and go again to angularControllerB, making a new notification will show 2 notifications. I console log the scope.$id and for example, for the 1st time angularControllerB had $id 12 and for the 2nd time $id 23. If I pass scope as argument to the notification, notify will send the to $id's (12 and 23) thus the 2 notifications.
To solve this I made:
notify.config({
'maximumOpen': 1
});
Not the perfect solution, but for now will do.