Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 4b2259a

Browse files
committed
docs(reactive-forms): sample docregion cleaning
1 parent d48afe2 commit 4b2259a

11 files changed

+38
-62
lines changed

public/docs/_examples/reactive-forms/ts/app/demo.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* tslint:disable:member-ordering */
2-
// #docregion
32
import { Component } from '@angular/core';
43

54
import { Hero } from './data-model';

public/docs/_examples/reactive-forms/ts/app/hero-detail-1.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
4-
52
// #docregion imports
6-
import { Component } from '@angular/core';
3+
import { Component } from '@angular/core';
74
import { FormControl, FormGroup } from '@angular/forms';
85
// #enddocregion
96

10-
//////// 1 ////////////////////////
11-
127
@Component({
138
moduleId: module.id,
149
selector: 'hero-detail-1',

public/docs/_examples/reactive-forms/ts/app/hero-detail-2.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
42
// #docregion imports
5-
import { Component } from '@angular/core';
3+
import { Component } from '@angular/core';
64
import { FormBuilder, FormGroup } from '@angular/forms';
75
// #enddocregion imports
86

9-
//////// 2 ////////////////////////
10-
117
@Component({
128
moduleId: module.id,
139
selector: 'hero-detail-2',

public/docs/_examples/reactive-forms/ts/app/hero-detail-3.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
4-
52
// #docregion imports
6-
import { Component } from '@angular/core';
3+
import { Component } from '@angular/core';
74
import { FormBuilder, FormGroup } from '@angular/forms';
5+
86
import { states } from './data-model';
97
// #enddocregion imports
108

11-
//////// 3 ////////////////////////
12-
139
@Component({
1410
moduleId: module.id,
1511
selector: 'hero-detail-3',

public/docs/_examples/reactive-forms/ts/app/hero-detail-4.component.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
4-
5-
import { Component } from '@angular/core';
2+
import { Component } from '@angular/core';
63
import { FormBuilder, FormGroup } from '@angular/forms';
7-
import { states } from './data-model';
84

9-
10-
////////// 4 /////////////////////
5+
import { states } from './data-model';
116

127
@Component({
138
moduleId: module.id,

public/docs/_examples/reactive-forms/ts/app/hero-detail-5.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
4-
// #docregion imports
2+
// #docregion import-input
53
import { Component, Input, OnChanges } from '@angular/core';
6-
import { FormBuilder, FormGroup } from '@angular/forms';
4+
// #enddocregion import-input
5+
import { FormBuilder, FormGroup } from '@angular/forms';
6+
7+
// #docregion import-hero
78
import { Hero, states } from './data-model';
8-
// #enddocregion imports
9+
// #enddocregion import-hero
910

1011
////////// 5 ////////////////////
1112

public/docs/_examples/reactive-forms/ts/app/hero-detail-6.component.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
4-
2+
// #docregion imports
53
import { Component, Input, OnChanges } from '@angular/core';
6-
import { FormBuilder, FormGroup } from '@angular/forms';
7-
import { Address, Hero, states } from './data-model';
4+
import { FormBuilder, FormGroup } from '@angular/forms';
85

9-
10-
///////// 6 ////////////////////
6+
import { Address, Hero, states } from './data-model';
7+
// #enddocregion imports
118

129
@Component({
1310
moduleId: module.id,

public/docs/_examples/reactive-forms/ts/app/hero-detail-7.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
/* tslint:disable:component-class-suffix */
2-
// #docplaster
3-
// #docregion
42
// #docregion imports
5-
import { Component, Input, OnChanges } from '@angular/core';
3+
import { Component, Input, OnChanges } from '@angular/core';
64
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
5+
76
import { Address, Hero, states } from './data-model';
87
// #enddocregion imports
98

10-
////////// 7 ////////////////////
11-
129
@Component({
1310
moduleId: module.id,
1411
selector: 'hero-detail-7',
15-
templateUrl: './hero-detail-5.component.html'
12+
templateUrl: './hero-detail-7.component.html'
1613
})
1714
// #docregion v7
1815
export class HeroDetailComponent7 implements OnChanges {
@@ -21,9 +18,12 @@ export class HeroDetailComponent7 implements OnChanges {
2118
heroForm: FormGroup;
2219
states = states;
2320

21+
// #docregion ctor
2422
constructor(private fb: FormBuilder) {
2523
this.createForm();
24+
this.logNameChange();
2625
}
26+
// #enddocregion ctor
2727

2828
createForm() {
2929
// #docregion secretLairs-form-array
@@ -34,6 +34,8 @@ export class HeroDetailComponent7 implements OnChanges {
3434
// #enddocregion secretLairs-form-array
3535
}
3636

37+
logNameChange() {/* Coming soon */}
38+
3739
// #docregion onchanges
3840
ngOnChanges() {
3941
// #docregion reset-refactor
@@ -65,5 +67,3 @@ export class HeroDetailComponent7 implements OnChanges {
6567
}
6668
// #enddocregion add-lair
6769
}
68-
// #enddocregion v7
69-

public/docs/_examples/reactive-forms/ts/app/hero-detail.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// tslint:disable:no-unused-variable
22
// #docplaster
33
// #docregion
4-
// #docregion reactive-comp-imports
4+
// #docregion imports
55
import { Component, EventEmitter, Input, Output, OnChanges } from '@angular/core';
66
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
77
import { Address, Hero, states } from './data-model';
8-
// #enddocregion reactive-comp-imports
8+
// #enddocregion imports
99

10-
// #docregion reactive-comp-metadata
10+
// #docregion metadata
1111
@Component({
1212
moduleId: module.id,
1313
selector: 'hero-detail',
1414
templateUrl: './hero-detail.component.html'
1515
})
16-
// #enddocregion reactive-comp-metadata
16+
// #enddocregion metadata
1717
export class HeroDetailComponent implements OnChanges {
1818
@Input() hero: Hero;
1919
// #docregion save-emitter

0 commit comments

Comments
 (0)