Scenario:
I have a multi-step form, if the user clicks on the next button, the only thing that changes in the route is the id e.g. form /step/:id
, but whenever I have steps/routes that contains the same components as the previous one, it only calls the 'created' method of the components of the first, it doesn't call on the next one.
Is there a way to re-create/initialise the components every time i change routes?
You can have a look at "Reacting to Params Changes" section in docs
To react to params changes in the same component, you can simply watch the $route object:
You can also have a look at my similar answer here.