angular-notify icon indicating copy to clipboard operation
angular-notify copied to clipboard

Sometimes two messages are showing even after closing all the notify

Open jeevasusej opened this issue 9 years ago • 3 comments

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?

jeevasusej avatar Nov 08 '16 09:11 jeevasusej

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'
                        });

jeevasusej avatar Nov 08 '16 09:11 jeevasusej

Sorry my solution is not worked. Please check the issue.

jeevasusej avatar Nov 08 '16 10:11 jeevasusej

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.

gabtec avatar Nov 17 '16 19:11 gabtec