Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes two messages are showing even after closing all the notify #69

Open
jeevasusej opened this issue Nov 8, 2016 · 3 comments
Open

Comments

@jeevasusej
Copy link

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
Copy link
Author

jeevasusej commented Nov 8, 2016

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 jeevasusej reopened this Nov 8, 2016
@jeevasusej
Copy link
Author

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

@jeevasusej jeevasusej reopened this Nov 8, 2016
@gabtec
Copy link

gabtec commented Nov 17, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants