chore(docs): remove @View decorator from examples in docs

Closes #4666
This commit is contained in:
Alex Eagle
2015-10-11 07:41:19 -07:00
committed by Alex Eagle
parent 62005dd127
commit b96784756c
36 changed files with 181 additions and 263 deletions

View File

@ -40,11 +40,9 @@ export {NgControlStatus} from './directives/ng_control_status';
* ### Example:
*
* ```typescript
* @View({
* directives: [FORM_DIRECTIVES]
* })
* @Component({
* selector: 'my-app'
* selector: 'my-app',
* directives: [FORM_DIRECTIVES]
* })
* class MyApp {}
* ```

View File

@ -23,8 +23,8 @@ const controlGroupBinding =
* We can work with each group separately: check its validity, get its value, listen to its changes.
*
* ```
* @Component({selector: "signup-comp"})
* @View({
* @Component({
* selector: "signup-comp",
* directives: [FORM_DIRECTIVES],
* template: `
* <form #f="form" (submit)='onSignUp(f.value)'>

View File

@ -28,8 +28,8 @@ const controlNameBinding =
* changes.
*
* ```
* @Component({selector: "login-comp"})
* @View({
* @Component({
* selector: "login-comp",
* directives: [FORM_DIRECTIVES],
* template: `
* <form #f="form" (submit)='onLogIn(f.value)'>
@ -50,8 +50,8 @@ const controlNameBinding =
* We can also use ng-model to bind a domain model to the form.
*
* ```
* @Component({selector: "login-comp"})
* @View({
* @Component({
* selector: "login-comp",
* directives: [FORM_DIRECTIVES],
* template: `
* <form (submit)='onLogIn()'>

View File

@ -42,9 +42,7 @@ const formDirectiveProvider =
*
* ```typescript
* @Component({
* selector: 'my-app'
* })
* @View({
* selector: 'my-app',
* template: `
* <div>
* <p>Submit the form to see the data object Angular builds</p>

View File

@ -24,9 +24,7 @@ const formControlBinding =
*
* ```typescript
* @Component({
* selector: 'my-app'
* })
* @View({
* selector: 'my-app',
* template: `
* <div>
* <h2>NgFormControl Example</h2>
@ -51,8 +49,8 @@ const formControlBinding =
* ### Example ([live demo](http://plnkr.co/edit/yHMLuHO7DNgT8XvtjTDH?p=preview))
*
* ```typescript
* @Component({selector: "login-comp"})
* @View({
* @Component({
* selector: "login-comp",
* directives: [FORM_DIRECTIVES],
* template: "<input type='text' [ng-form-control]='loginControl' [(ng-model)]='login'>"
* })

View File

@ -25,9 +25,7 @@ const formDirectiveProvider =
*
* ```typescript
* @Component({
* selector: 'my-app'
* })
* @View({
* selector: 'my-app',
* template: `
* <div>
* <h2>NgFormModel Example</h2>
@ -60,8 +58,8 @@ const formDirectiveProvider =
* We can also use ng-model to bind a domain model to the form.
*
* ```typescript
* @Component({selector: "login-comp"})
* @View({
* @Component({
* selector: "login-comp",
* directives: [FORM_DIRECTIVES],
* template: `
* <form [ng-form-model]='loginForm'>

View File

@ -24,8 +24,8 @@ const formControlBinding =
*
* ### Example ([live demo](http://plnkr.co/edit/R3UX5qDaUqFO2VYR0UzH?p=preview))
* ```typescript
* @Component({selector: "search-comp"})
* @View({
* @Component({
* selector: "search-comp",
* directives: [FORM_DIRECTIVES],
* template: `<input type='text' [(ng-model)]="searchQuery">`
* })

View File

@ -10,14 +10,12 @@ import * as modelModule from './model';
* # Example
*
* ```
* import {Component, View, bootstrap} from 'angular2/angular2';
* import {Component, bootstrap} from 'angular2/angular2';
* import {FormBuilder, Validators, FORM_DIRECTIVES, ControlGroup} from 'angular2/core';
*
* @Component({
* selector: 'login-comp',
* viewProviders: [FormBuilder]
* })
* @View({
* viewProviders: [FormBuilder],
* template: `
* <form [control-group]="loginForm">
* Login <input control="login">