This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +26
-17
lines changed
public/docs/_examples/reactive-forms/ts/app Expand file tree Collapse file tree 4 files changed +26
-17
lines changed Original file line number Diff line number Diff line change 1
1
<!-- #docregion simple-control-->
2
2
< h2 > Hero Detail</ h2 >
3
3
< h3 > < i > Just a FormControl</ i > </ h3 >
4
- < input class ="form-control " [formControl] ="name ">
4
+ < label > Name:
5
+ < input class ="form-control " [formControl] ="name ">
6
+ </ label >
5
7
<!-- #enddocregion simple-control-->
6
8
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ <h2>Hero Detail</h2>
3
3
< h3 > < i > FormControl in a FormGroup</ i > </ h3 >
4
4
< form [formGroup] ="heroForm " novalidate >
5
5
< div class ="form-group ">
6
- < label > Name:</ label >
7
- < input class ="form-control " formControlName ="name ">
6
+ < label > Name:
7
+ < input class ="form-control " formControlName ="name ">
8
+ </ label >
8
9
</ div >
9
10
</ form >
10
11
<!-- #enddocregion basic-form-->
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ <h2>Hero Detail</h2>
3
3
< h3 > < i > A FormGroup with a single FormControl using FormBuilder</ i > </ h3 >
4
4
< form [formGroup] ="heroForm " novalidate >
5
5
< div class ="form-group ">
6
- < label > Name:</ label >
7
- < input class ="form-control " formControlName ="name ">
6
+ < label > Name:
7
+ < input class ="form-control " formControlName ="name ">
8
+ </ label >
8
9
</ div >
9
10
</ form >
10
11
<!-- #enddocregion basic-form-->
Original file line number Diff line number Diff line change @@ -3,26 +3,31 @@ <h2>Hero Detail</h2>
3
3
< h3 > < i > A FormGroup with multiple FormControls</ i > </ h3 >
4
4
< form [formGroup] ="heroForm " novalidate >
5
5
< div class ="form-group ">
6
- < label > Name:</ label >
7
- < input class ="form-control " formControlName ="name ">
6
+ < label > Name:
7
+ < input class ="form-control " formControlName ="name ">
8
+ </ label >
8
9
</ div >
9
10
< div class ="form-group ">
10
- < label > Street:</ label >
11
- < input class ="form-control " formControlName ="street ">
11
+ < label > Street:
12
+ < input class ="form-control " formControlName ="street ">
13
+ </ label >
12
14
</ div >
13
15
< div class ="form-group ">
14
- < label > City:</ label >
15
- < input class ="form-control " formControlName ="city ">
16
+ < label > City:
17
+ < input class ="form-control " formControlName ="city ">
18
+ </ label >
16
19
</ div >
17
20
< div class ="form-group ">
18
- < label > State:</ label >
19
- < select class ="form-control " formControlName ="state ">
20
- < option *ngFor ="let state of states "> {{state}}</ option >
21
- </ select >
21
+ < label > State:
22
+ < select class ="form-control " formControlName ="state ">
23
+ < option *ngFor ="let state of states "> {{state}}</ option >
24
+ </ select >
25
+ </ label >
22
26
</ div >
23
27
< div class ="form-group ">
24
- < label > Zip Code:</ label >
25
- < input class ="form-control " formControlName ="zip ">
28
+ < label > Zip Code:
29
+ < input class ="form-control " formControlName ="zip ">
30
+ </ label >
26
31
</ div >
27
32
< div class ="form-group ">
28
33
< label > Super power:</ label >
You can’t perform that action at this time.
0 commit comments