Skip to content

Commit 2e6c323

Browse files
Awk34christopherthielen
authored andcommitted
docs(Ng2StateDeclaration): fix views examples (#3063)
views properties should be of the format `{component: MyComponent}`
1 parent a0688ae commit 2e6c323

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ng2/interface.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export interface Ng2StateDeclaration extends StateDeclaration, Ng2ViewDeclaratio
4848
* ```js
4949
*
5050
* views: {
51-
* header: HeaderComponent,
52-
* body: BodyComponent,
53-
* footer: FooterComponent
51+
* header: {component: HeaderComponent},
52+
* body: {component: BodyComponent},
53+
* footer: {component: FooterComponent}
5454
* }
5555
* ```
5656
*
@@ -60,8 +60,8 @@ export interface Ng2StateDeclaration extends StateDeclaration, Ng2ViewDeclaratio
6060
* // Targets named ui-view="header" in the template of the ancestor state 'top'
6161
* // and the named `ui-view="body" from the parent state's template.
6262
* views: {
63-
* 'header@top': MsgHeaderComponent,
64-
* 'body': MessagesComponent
63+
* 'header@top': {component: MsgHeaderComponent},
64+
* 'body': {component: MessagesComponent}
6565
* }
6666
* ```
6767
*

0 commit comments

Comments
 (0)