@angular/routerlink
入口点
主要
@angular/router |
次要
@angular/router/testing | |
@angular/router/upgrade |
导出列表
类
ActivationEnd | Represents the start of end of the Resolve phase of routing. See note on |
ActivationStart | Represents the start of end of the Resolve phase of routing. See note on |
ChildActivationEnd | Represents the start of end of the Resolve phase of routing. See note on |
ChildActivationStart | Represents the start of end of the Resolve phase of routing. See note on |
GuardsCheckEnd | Represents the end of the Guard phase of routing. 表示路由的守卫( |
GuardsCheckStart | Represents the start of the Guard phase of routing. 表示路由的守卫( |
NavigationCancel | Represents an event triggered when a navigation is canceled. 表示当导航被取消时触发的事件。 |
NavigationEnd | Represents an event triggered when a navigation ends successfully. 表示当导航成功结束时触发的事件。 |
NavigationError | Represents an event triggered when a navigation fails due to an unexpected error. 表示当导航出错时触发的事件。 |
NavigationStart | Represents an event triggered when a navigation starts. 代表导航开始时触发的事件。 |
ResolveEnd | Represents the end of the Resolve phase of routing. See note on 表示路由解析( |
ResolveStart | Represents the start of the Resolve phase of routing. The timing of this event may change, thus it's experimental. In the current iteration it will run in the "resolve" phase whether there's things to resolve or not. In the future this behavior may change to only run when there are things to be resolved. 表示路由解析( |
RouteConfigLoadEnd | Represents an event triggered when a route has been lazy loaded. 表示当某个路由被惰性加载时触发的事件。 |
RouteConfigLoadStart | Represents an event triggered before lazy loading a route config. 表示在惰性加载某个路由配置前触发的事件。 |
RouterEvent | Base for events the Router goes through, as opposed to events tied to a specific Route. 路由器相关事件的(而不是关于特定路由的)基类。对于任何指定的导航, |
RoutesRecognized | Represents an event triggered when routes are recognized. 表示当路由被识别出来时触发的事件。 |
Scroll | Represents a scrolling event. 表示一个滚动事件。 |
RouteReuseStrategy | Provides a way to customize when activated routes get reused. |
Router | Provides the navigation and url manipulation capabilities. 提供导航和操纵 URL 的能力。 |
RouterModule | Adds router directives and providers. 添加路由器指令和服务提供商。 |
ChildrenOutletContexts | Store contextual information about the children (= nested) |
OutletContext | Store contextual information about a |
NoPreloading | Provides a preloading strategy that does not preload any modules. |
PreloadAllModules | Provides a preloading strategy that preloads all modules as quickly as possible. |
PreloadingStrategy | Provides a preloading strategy. |
RouterPreloader | The preloader optimistically loads all router configurations to make navigations into lazily-loaded sections of the application faster. |
UrlHandlingStrategy | Provides a way to migrate AngularJS applications to Angular. |
DefaultUrlSerializer | A default implementation of the |
UrlSegment | Represents a single URL segment. |
UrlSegmentGroup | Represents the parsed URL segment group. |
UrlSerializer | Serializes and deserializes a URL string into a URL tree. |
函数
provideRoutes | Registers routes. 注册路由。 |
convertToParamMap |
结构
Route | See 欲知详情,参见 |
CanActivate | Interface that a class can implement to be a guard deciding if a route can be activated. 一个接口,某些类可以实现它以扮演一个守卫,来决定该路由能否激活。 |
CanActivateChild | Interface that a class can implement to be a guard deciding if a child route can be activated. 一个接口,某些类可以实现它以扮演一个守卫,来决定该路由的子路由能否激活。 |
CanDeactivate | Interface that a class can implement to be a guard deciding if a route can be deactivated. 一个接口,某些类可以实现它以扮演一个守卫,来决定该路由能否停用。 |
CanLoad | Interface that a class can implement to be a guard deciding if a children can be loaded. 一个接口,某些类可以实现它以扮演一个守卫,来决定该路由的子路由能否加载。 |
Resolve | Interface that class can implement to be a data provider. 一个接口,某些类可以实现它以扮演一个数据提供者。 |
NavigationExtras | Represents the extra options used during navigation. 表示在导航时用到的额外选项。 |
ExtraOptions | Represents options to configure the router. 表示路由器的配置项。 |
ActivatedRoute | Contains the information about a route associated with a component loaded in an outlet. An 包含与当前组件相关的路由信息。 |
ActivatedRouteSnapshot | Contains the information about a route associated with a component loaded in an outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to traverse the router state tree. 包含与当前组件相关的路由的当前瞬间信息。 |
RouterState | Represents the state of the router. |
RouterStateSnapshot | Represents the state of the router at a moment in time. 表示路由器在当前瞬间的状态。 |
ParamMap | Matrix and Query parameters. 矩阵参数( |
UrlTree | Represents the parsed URL. |
指令
RouterLink | Lets you link to specific routes in your app. 让你可以在应用中链接到特定的路由。 |
RouterLinkWithHref | Lets you link to specific routes in your app. 允许你在应用中链接到特定的路由。 |
RouterLinkActive | Lets you add a CSS class to an element when the link's route becomes active. 当此链接指向的路由激活时,往宿主元素上添加一个 CSS 类。 |
RouterOutlet | Acts as a placeholder that Angular dynamically fills based on the current router state. 一个占位符,Angular 会根据当前的路由器状态动态填充它。 |
类型
Data | Represents the static data associated with a particular route. 表示与特定路由相关的静态数据。 |
LoadChildren | The type of
|
LoadChildrenCallback | The type of
|
ResolveData | Represents the resolved data associated with a particular route. 表示与特定路由相关的解析出来的数据。 |
Routes | Represents router configuration. 表示路由器配置。 |
RunGuardsAndResolvers | The type of
|
UrlMatchResult | Represents the results of the URL matching. 表示 URL 匹配的结果。 |
UrlMatcher | A function matching URLs 用于匹配 URL 的函数 |
Event | Represents a router event, allowing you to track the lifecycle of the router. 表示一个路由器事件,允许你跟踪路由器本身的生命周期。 |
DetachedRouteHandle | Represents the detached route tree. |
ROUTES | |
ROUTER_CONFIGURATION | Is used in DI to configure the router. DI 用它来配置路由器。 |
ROUTER_INITIALIZER | A token for the router initializer that will be called after the app is bootstrapped. 一个代表路由器初始化器的令牌,应用引导完毕后就会调用它。 |
PRIMARY_OUTLET | Name of the primary outlet. |
Params | A collection of parameters. |