The activation life cycle is automatically used by the router, but sometimes, you want to use it without tying the work to the URL, which turns out to be quite easy. An activator is just a computed observable whose write function enforces the life cycle. An activator can be created by calling
activator.create() using the
For this example, we are going to add an inline quick edit to the list page that will allow contacts to be edited without navigating to another page. It will leverage the existing edit page viewmodel with some minor changes, as it already has a
canDeactivate method that prompts the user with a confirmation modal when unsaved changes are present. The list page activator will hook into ...