The easy way to customize child router based on parent router param

Just to add some clarification to the above:

  • activationStrategy.invokeLifecycle should be sufficient to ensure activate() is called.

activate() is called by default when the route params have changed (which triggers the navigation plan to set the strategy to invokeLifecycle)

  • activationStrategy.replace actually invokes the whole component lifecycle (including the templating’s bind(), attached() etc).

The navigation plan normally only sets the strategy to replace when the moduleId has changed e.g. a new viewmodel needs to be composed. Forcing the whole component lifecycle is costly and unnecessary if (can)(de)activate is really all you need.

1 Like