How to router.navigate to same route in Angular 4 and catch the same event?

前端 未结 4 504
情深已故
情深已故 2021-01-02 08:35

Okay, I have two use cases for my question here:

  1. I\'m working on an application which has a /en/register route. It all works good when I\'m at t

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 09:14

    Just add dummy parameter at the end of the route /en/register/jk2h4-42hj-234n2-234dfg or query parameter like /en/register?val=jk2h4-42hj-234n2-234dfg

    change the parameter value when calling the same route. So browser knows that URL change and Angualr component start to work from full life cycle.

提交回复
热议问题