You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the #init hook of any route to run once and not repeatedly. When I inject the router service into a route and call this.router.recognize I see the #init hook fire multiple times.
You can see this in the follow application:
git clone https://github.com/efx/poc-bug/ --branch 3.8.1 && cd poc-bug/route-recognize
yarn start
Open your console and you should see the #init log multiple times. If you remove the line that calls this.router.recognize, the init fires once. I verified 3.8.0 and master as of 3.11.0-canary+7da998b3 exhibits the same bug.
The text was updated successfully, but these errors were encountered:
Verified this still occurs on 3.11. To be clear, I am accessing the router service from within a route not from the router. @xg-wang honestly I've forgotten what I was trying to do when I opened this issue. Given I unblocked our application we could close this if expected behavior but I do find this very counter-intuitive and would be curious why this happens. (Updated link of the router service)
I expect the
#init
hook of any route to run once and not repeatedly. When I inject the router service into a route and callthis.router.recognize
I see the#init
hook fire multiple times.You can see this in the follow application:
git clone https://github.com/efx/poc-bug/ --branch 3.8.1 && cd poc-bug/route-recognize
yarn start
Open your console and you should see the
#init
log multiple times. If you remove the line that callsthis.router.recognize
, theinit
fires once. I verified3.8.0
and master as of3.11.0-canary+7da998b3
exhibits the same bug.The text was updated successfully, but these errors were encountered: