export interface CanReuse
export interface CanReuse
exported from angular2/router defined in angular2/src/router/interfaces.ts (line 70)
Defines route lifecycle method routerCanReuse, which is called by the router to determine
whether a
component should be reused across routes, or whether to destroy and instantiate a new component.
The routerCanReuse hook is called with two ComponentInstructions as parameters, the
first
representing the current route being navigated to, and the second parameter representing the
previous route.
If routerCanReuse returns or resolves to true, the component instance will be reused and the
OnDeactivate hook will be run. If routerCanReuse returns or resolves to false, a new
component will be instantiated, and the existing component will be deactivated and removed as
part of the navigation.
If routerCanReuse throws or rejects, the navigation will be cancelled.
Example
Members
routerCanReuse(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction) : any
routerCanReuse(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction) : any
Not Yet Documented