angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

$onInit is called twice when componentProvider is used #3735

Closed valterkraemer closed 4 years ago

valterkraemer commented 5 years ago

This is a:

My version of UI-Router is: 1.0.20

Bug Report

Current Behavior:

$onInit is called twice when componentProvider is used.

Expected Behavior:

$onInit should be called once.

Link to Plunker or stackblitz that reproduces the issue:

Navigating to about fires $onInit twice (componentProvider). Home only once (component).

https://stackblitz.com/edit/ui-router-angularjs-g5wlce?file=app.js

This issue have been introduced recently, I think it worked in 1.0.17.

N1ck commented 4 years ago

https://github.com/angular-ui/ui-router/issues/3779 appears to fix this issue.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues may be reopened.

Thank you for your contributions.