What is Router Events Angular 4
During each navigation, the
Router
emits navigation events through the Router.events
property. These events range from when the navigation starts and ends to many points in between. The full list of navigation events is displayed in the table below.Router Event | Description |
---|---|
NavigationStart |
An event triggered when navigation starts.
|
RoutesRecognized |
An event triggered when the Router parses the URL and the routes are recognized.
|
RouteConfigLoadStart |
An event triggered before the
Router lazy loads a route configuration. |
RouteConfigLoadEnd |
An event triggered after a route has been lazy loaded.
|
NavigationEnd |
An event triggered when navigation ends successfully.
|
NavigationCancel |
An event triggered when navigation is canceled. This is due to a Route Guardreturning false during navigation.
|
NavigationError |
An event triggered when navigation fails due to an unexpected error.
|
0 comments:
Post a Comment