Leaving a Route
Here, you’ll learn about transition events in Ember.js.
We saw how different route hooks can be leveraged to modify the flow of transition and redirect midway to another route. Another category of tasks is enabled by subscribing to router service events.
routeWillChange
There are two such events: routeDidChange
and routeWillChange
. We’ll use routeWillChange
to warn the user about losing unsaved changes.
If the user starts typing the name of a new band and then clicks another link, the app transitions away from the page. The ...
Access this course and 1400+ top-rated courses and projects.