Maps application URLs into application states, to support deep-linking and navigation.

Constants

ROUTER_BINDINGS → dynamic

Use ROUTER_PROVIDERS instead.

ROUTER_PROVIDERS
ROUTER_DIRECTIVES → List

A list of directives. To use the router directives like RouterOutlet and RouterLink, add this to your directives array in the View decorator of your component.

const [RouterOutlet, RouterLink]
ROUTER_PRIMARY_COMPONENT OpaqueToken

Token used to bind the component with the top-level RouteConfigs for the application.

const OpaqueToken("RouterPrimaryComponent")
ROUTER_PROVIDERS → List

A list of Providers. To use the router, you must add this to your application.

const [ROUTER_PROVIDERS_COMMON, const Provider(PlatformLocation, useClass: BrowserPlatformLocation)]
ROUTER_PROVIDERS_COMMON → List

The Platform agnostic ROUTER PROVIDERS

const [RouteRegistry, const Provider(LocationStrategy, useClass: PathLocationStrategy), Location, const Provider(Router, useFactory: routerFactory, deps: const [RouteRegistry, Location, ROUTER_PRIMARY…

Classes

AbstractRoute

AsyncRoute

AsyncRoute is a type of RouteDefinition used to route a path to an asynchronously loaded component.

AuxRoute

AuxRoute is a type of RouteDefinition used to define an auxiliary route.

CanActivate

CanDeactivate

Defines route lifecycle method routerCanDeactivate, which is called by the router to determine if a component can be removed as part of a navigation.

CanReuse

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.

ComponentInstruction

Route state for a single component.

Instruction

Instruction is a tree of ComponentInstructions with all the information needed to transition each component in the app to a given route, including all auxiliary routes.

OnActivate

Defines route lifecycle method routerOnActivate, which is called by the router at the end of a successful route navigation.

OnDeactivate

Defines route lifecycle method routerOnDeactivate, which is called by the router before destroying a component as part of a route change.

OnReuse

Defines route lifecycle method routerOnReuse, which is called by the router at the end of a successful route navigation when CanReuse is implemented and returns or resolves to true.

OpaqueToken

Creates a token that can be used in a DI Provider.

Redirect

Redirect is a type of RouteDefinition used to route a path to a canonical route.

Route

Route is a type of RouteDefinition used to route a path to a component.

RouteConfig

The RouteConfig decorator defines routes for a given component.

RouteData

RouteData is an immutable map of additional data you can configure in your Route.

RouteDefinition

RouteParams

Immutable map of parameters for the given route based on the url matcher and optional parameters for that route.

Router

The Router is responsible for mapping URLs to components.

RouteRegistry

The RouteRegistry holds route configurations for each component in an Angular app. It is responsible for creating Instructions from URLs, and generating URLs based on route and parameters.

The RouterLink directive lets you link to specific parts of your app.

RouterOutlet

A router outlet is a placeholder that Angular dynamically fills based on the application's route.