What is the order of execution in Aurelia routing and rendering pipeline when application navigates from one URL to another?
There are two lifecycles:
Router Lifecycle is:
canDeactivate
canActivate
deactivate
activate
The Component Lifecycle is:
When loaded:
created
bind
attached
When unloaded:
detached
unbind
As to how this all goes together, simply adding each of these callbacks to two routed pages and logging the calls shows this:
Previous Page canDeactivate
Next Page canActivate
Previous Page deactivate
Next Page activate
Next Page created
Next Page bind
Previous Page detached
Previous Page unbind
Next Page attached
If we include the router hooks (steps) that were included in your original answer, then it looks like this:
Previous Page canDeactivate
Authorize step
Next Page canActivate
Pre-activate step
Previous Page deactivate
Next Page activate
Pre-render step
Next Page created
Next Page bind
Post-render step
Previous Page detached
Previous Page unbind
Next Page attached
I've included both as most applications won't have the hooks added.