Skip to content

Commit

Permalink
docs(ng2.UIRouterModule): Fix examples with @decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Sep 9, 2016
1 parent b4a2499 commit 4ede2fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ng2/uiRouterNgModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const UIROUTER_STATES_TOKEN = new OpaqueToken("UIRouter States");
* var homeState = { name: 'home', url: '/home', component: Home };
* var aboutState = { name: 'about', url: '/about', component: About };
*
* @UIRouterModule({
* @ UIRouterModule({
* imports: [ BrowserModule ],
* declarations: [ NonRoutedComponent ],
* states: [ homeState, aboutState ]
Expand All @@ -65,22 +65,21 @@ export const UIROUTER_STATES_TOKEN = new OpaqueToken("UIRouter States");
* Note: the `UIRouterModule` decorator creates a standard Angular 2 `NgModule`.
* The equivalent `AppModule` could also be crafted by hand using only the `NgModule` decorator:
*
* ```
* ```js
* var homeState = { name: 'home', url: '/home', component: Home };
* var aboutState = { name: 'about', url: '/about', component: About };
*
* @NgModule({
* @ NgModule({
* imports: [BrowserModule, UIRouterLibraryModule],
* declarations: [NonRoutedComponent, Home, About],
* entryComponents: [Home, About],
* providers: [
* { provide: UIROUTER_STATES_TOKEN, useValue: [homeState, aboutState], multi: true }
* ]
* }) export class AppModule {};
*
* ```
*
* @param moduleMetaData the [[UIRouterModuleMetadata]]
* @param moduleMetaData
* (See also [NgModuleMetadataType](https://angular.io/docs/ts/latest/api/core/index/NgModuleMetadataType-interface.html)
*/
export function UIRouterModule(moduleMetaData: UIRouterModuleMetadata) {
Expand Down

0 comments on commit 4ede2fb

Please sign in to comment.