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

Commit fe97610

Browse files
wardbellkapunahelewong
authored andcommitted
docs(reactive-forms): a little massaging by Ward
1 parent 896334b commit fe97610

File tree

12 files changed

+83
-388
lines changed

12 files changed

+83
-388
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="container">
2-
<reactive-form></reactive-form>
3-
</div>
2+
<reactive-form></reactive-form>
3+
</div>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* tslint:disable:no-unused-variable */
21
import { AppComponent } from './app.component';
32

43
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Component } from '@angular/core';
2-
import { ReactiveFormComponent } from './reactive-form.component';
32

43
@Component({
5-
moduleId: module.id,
4+
moduleId: module.id,
65
selector: 'my-app',
76
templateUrl: './app.component.html'
87
})
Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
1-
import { NgModule } from '@angular/core';
2-
import { BrowserModule } from '@angular/platform-browser';
1+
// #docplaster
2+
// #docregion
3+
// #docregion add-reactive-forms-module
4+
import { NgModule } from '@angular/core';
5+
import { BrowserModule } from '@angular/platform-browser';
36

4-
import { AppComponent } from './app.component';
7+
import { ReactiveFormsModule } from '@angular/forms'; // <-- #1 import the module
58

6-
import { ReactiveFormsModule } from '@angular/forms';
9+
import { AppComponent } from './app.component';
10+
// #enddocregion add-reactive-forms-module
711
import { ReactiveFormComponent } from './reactive-form.component';
812

13+
// #docregion add-reactive-forms-module
914
@NgModule({
10-
imports: [
11-
BrowserModule,
12-
ReactiveFormsModule
15+
imports: [
16+
BrowserModule,
17+
ReactiveFormsModule // <-- #2 add to Angular module imports
1318
],
1419
declarations: [
15-
AppComponent,
16-
ReactiveFormComponent
20+
AppComponent,
21+
// #enddocregion add-reactive-forms-module
22+
ReactiveFormComponent // <-- #3 declare the reactive forms component
23+
// #docregion add-reactive-forms-module
1724
],
18-
bootstrap: [ AppComponent ]
25+
bootstrap: [ AppComponent ]
1926
})
2027
export class AppModule { }
28+
// #enddocregion add-reactive-forms-module
29+
// #docregion

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

Lines changed: 0 additions & 215 deletions
This file was deleted.

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

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// #docregion
22
export class Hero {
3-
43
constructor(
54
public id: number,
65
public name: string,
76
public power: string,
87
public alterEgo?: string
98
) { }
10-
119
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2-
32
import { AppModule } from './app.module';
43

54
platformBrowserDynamic().bootstrapModule(AppModule);

0 commit comments

Comments
 (0)