Skip to content

Nested ui-view calls directive's $onInit twice #3224

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

Closed
esinek opened this issue Dec 22, 2016 · 3 comments
Closed

Nested ui-view calls directive's $onInit twice #3224

esinek opened this issue Dec 22, 2016 · 3 comments

Comments

@esinek
Copy link

esinek commented Dec 22, 2016

Using a parent-child hierarchy with nested ui-views, I am having my directive's $onInit being called twice. I've created a SO post for this
http://stackoverflow.com/q/41269277/156611

and also a couple plunkers. One without named views, one with named views.
http://plnkr.co/edit/rc8vbt?p=preview
http://plnkr.co/edit/PZnA5h?p=preview

Is this an issue with how I'm structuring the code or an issue with ui-router?

@christopherthielen
Copy link
Contributor

This was fixed by #3164

The initial content gets linked twice, IIRC.

http://plnkr.co/edit/JjNmK2?p=preview

@d4guru
Copy link

d4guru commented Jan 23, 2017

Hi,
I have downloaded the last version @version v0.4.2 but I still get my directive called twice when inside nested <ui-view> which version do I have to download to make it work ?

Thank you

@christopherthielen
Copy link
Contributor

@d4guru the fix was in 0.4.0

If it's still not working, I need a way to reproduce the error. I suspect you might have a bug in your application causing the behavior.

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

3 participants