The UI-Router providers, for use in your application bootstrap
Returns a function which lazy loads a nested module
Returns a function which lazy loads a nested module
Use this function as a StateDeclaration.lazyLoad property to lazy load a state tree (an NgModule).
the path to the module source code.
A function which takes a transition, then:
returns the new states array
This is a StateBuilder.builder function for angular2 views
.
This is a StateBuilder.builder function for angular2 views
.
When the StateBuilder builds a State object from a raw StateDeclaration, this builder
handles the views
property with logic specific to ui-router-ng2.
If no views: {}
property exists on the StateDeclaration, then it creates the views
object and
applies the state-level configuration to a view named $default
.
This is a factory function for a UIRouter instance
This is a factory function for a UIRouter instance
Creates a UIRouter instance and configures it for Angular 2, then invokes router bootstrap.
This function is used as an Angular 2 useFactory
Provider.
Generated using TypeDoc
UI-Router for Angular 2
Getting started:
ui-router-ng2
"ui-router-ng2"
import {StateRegistry} from "ui-router-ng2";
export let state1: Ng2StateDeclaration = { name: 'state1', component: State1Component, url: '/one' } export let state2: Ng2StateDeclaration = { name: 'state2', component: State2Component, url: '/two' }
NgModule
s.@ NgModule({ imports: [ SharedModule, UIRouterModule.forChild({ states: [state1, state2 ] }) ], declarations: [ State1Component, State2Component, ] }) export class MyFeatureModule {}
NgModule
<ui-view></ui-view>
viewport to your root component.@ NgModule({ imports: [ BrowserModule, UIRouterModule.forRoot({ states: [ homeState ] }), MyFeatureModule, ], declarations: [ HomeComponent ] bootstrap: [ UIView ] }) class RootAppModule {} browserPlatformDynamic.bootstrapModule(RootAppModule);
import {UIRouter} from "ui-router-ng2"; @ Injectable() export class MyUIRouterConfig { // Constructor is injectable constructor(uiRouter: UIRouter) { uiRouter.urlMatcherFactory.type('datetime', myDateTimeParamType); } }