-
Notifications
You must be signed in to change notification settings - Fork 109
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
Handle multiple init calls. #5
Labels
Comments
Ah, yeah thats possible. I'll try to fix it later. Thanks! |
is it possible to add this? cheers Lew |
@maikeldaloo |
Thanks @lewie6 I added your angular version to the readme! |
thanks man! |
baseonmars
referenced
this issue
in citizensadvice/priority-navigation
Apr 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I just used the priorityNav plugin inside an AngularJS directive.
The directive would run
priorityNav.init()
after defining the settings.But when I have 2 instances of the AngularJS directive on the page, the
priorityNav.init()
gets called twice, and on the 2nd call, it actually breaks all instances on the page because the wrapper element is duplicated and what happens is that the first copy has the 'hidden' links, while the second copy of the wrapper has the button event!I have currently fixed this issue by allowing my directive to run only once. But I think a fix on your end is a lot safer.
Cheers,
Maikel
The text was updated successfully, but these errors were encountered: