Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(aio): update reactive-forms to CLI #20019

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions aio/content/examples/reactive-forms/debug.log
@@ -0,0 +1,3 @@
[1030/162525.401:ERROR:process_reader_win.cc(123)] NtOpenThread: {Acceso denegado} Un proceso ha solicitado acceso a un objeto, pero no se le han concedido esos derechos de acceso. (0xc0000022)
[1030/162525.402:ERROR:exception_snapshot_win.cc(87)] thread ID 26896 not found in process
[1030/162525.402:WARNING:crash_report_exception_handler.cc(62)] ProcessSnapshotWin::Initialize failed
@@ -0,0 +1,4 @@
<div class="container">
<h1>Reactive Forms</h1>
<app-hero-detail></app-hero-detail>
</div>
12 changes: 0 additions & 12 deletions aio/content/examples/reactive-forms/src/app/app.component.1.ts

This file was deleted.

Empty file.
@@ -0,0 +1,4 @@
<div class="container">
<h1>Reactive Forms</h1>
<app-hero-list></app-hero-list>
</div>
7 changes: 2 additions & 5 deletions aio/content/examples/reactive-forms/src/app/app.component.ts
Expand Up @@ -3,10 +3,7 @@ import { Component } from '@angular/core';

@Component({
selector: 'app-root',
template: `
<div class="container">
<h1>Reactive Forms</h1>
<app-hero-list></app-hero-list>
</div>`
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent { }
6 changes: 3 additions & 3 deletions aio/content/examples/reactive-forms/src/app/app.module.ts
Expand Up @@ -6,9 +6,9 @@ import { BrowserModule } from '@angular/platform-browser';
import { ReactiveFormsModule } from '@angular/forms'; // <-- #1 import module

import { AppComponent } from './app.component';
import { HeroDetailComponent } from './hero-detail.component'; // <-- #1 import component
import { HeroDetailComponent } from './hero-detail/hero-detail.component'; // <-- #1 import component
// #enddocregion v1
import { HeroListComponent } from './hero-list.component';
import { HeroListComponent } from './hero-list/hero-list.component';

import { HeroService } from './hero.service'; // <-- #1 import service
// #docregion v1
Expand All @@ -20,7 +20,7 @@ import { HeroService } from './hero.service'; // <-- #1 import service
],
declarations: [
AppComponent,
HeroDetailComponent, // <-- #3 declare app component
HeroDetailComponent,
// #enddocregion v1
HeroListComponent
// #docregion v1
Expand Down
16 changes: 8 additions & 8 deletions aio/content/examples/reactive-forms/src/app/demo.module.ts
Expand Up @@ -4,14 +4,14 @@ import { ReactiveFormsModule } from '@angular/forms';

import { AppModule } from './app.module';
import { DemoComponent } from './demo.component';
import { HeroDetailComponent1 } from './hero-detail-1.component';
import { HeroDetailComponent2 } from './hero-detail-2.component';
import { HeroDetailComponent3 } from './hero-detail-3.component';
import { HeroDetailComponent4 } from './hero-detail-4.component';
import { HeroDetailComponent5 } from './hero-detail-5.component';
import { HeroDetailComponent6 } from './hero-detail-6.component';
import { HeroDetailComponent7 } from './hero-detail-7.component';
import { HeroDetailComponent8 } from './hero-detail-8.component';
import { HeroDetailComponent1 } from './hero-detail/hero-detail-1.component';
import { HeroDetailComponent2 } from './hero-detail/hero-detail-2.component';
import { HeroDetailComponent3 } from './hero-detail/hero-detail-3.component';
import { HeroDetailComponent4 } from './hero-detail/hero-detail-4.component';
import { HeroDetailComponent5 } from './hero-detail/hero-detail-5.component';
import { HeroDetailComponent6 } from './hero-detail/hero-detail-6.component';
import { HeroDetailComponent7 } from './hero-detail/hero-detail-7.component';
import { HeroDetailComponent8 } from './hero-detail/hero-detail-8.component';

@NgModule({
imports: [
Expand Down
@@ -1,8 +1,9 @@
/* tslint:disable:component-class-suffix */
// #docregion imports
import { Component } from '@angular/core';
import { FormControl } from '@angular/forms';
// #enddocregion

import { Component } from '@angular/core';
// #docregion import
import { FormControl } from '@angular/forms';
// #enddocregion import

@Component({
selector: 'app-hero-detail-1',
Expand Down
Expand Up @@ -3,7 +3,7 @@
import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';

import { states } from './data-model';
import { states } from '../data-model';
// #enddocregion imports

@Component({
Expand Down
Expand Up @@ -2,7 +2,7 @@
import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';

import { states } from './data-model';
import { states } from '../data-model';

@Component({
selector: 'app-hero-detail-5',
Expand Down
Expand Up @@ -5,7 +5,7 @@ import { Component, Input, OnChanges } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';

// #docregion import-hero
import { Hero, states } from './data-model';
import { Hero, states } from '../data-model';
// #enddocregion import-hero

////////// 6 ////////////////////
Expand Down
Expand Up @@ -5,7 +5,7 @@ import { Component, Input, OnChanges } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';

// #docregion import-address
import { Address, Hero, states } from './data-model';
import { Address, Hero, states } from '../data-model';
// #enddocregion import-address

// #enddocregion imports
Expand Down
Expand Up @@ -3,7 +3,7 @@
import { Component, Input, OnChanges } from '@angular/core';
import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';

import { Address, Hero, states } from './data-model';
import { Address, Hero, states } from '../data-model';
// #enddocregion imports

@Component({
Expand Down
Expand Up @@ -3,17 +3,16 @@
import { Component, Input, OnChanges } from '@angular/core';
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';

import { Address, Hero, states } from './data-model';
import { Address, Hero, states } from '../data-model';
// #docregion import-service
import { HeroService } from './hero.service';
import { HeroService } from '../hero.service';
// #enddocregion import-service

// #docregion metadata
@Component({
selector: 'app-hero-detail',
templateUrl: './hero-detail.component.html'
templateUrl: './hero-detail.component.html',
styleUrls: ['./hero-detail.component.css']
})
// #enddocregion metadata
export class HeroDetailComponent implements OnChanges {
@Input() hero: Hero;

Expand Down
Expand Up @@ -3,12 +3,13 @@ import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/finally';

import { Hero } from './data-model';
import { HeroService } from './hero.service';
import { Hero } from '../data-model';
import { HeroService } from '../hero.service';

@Component({
selector: 'app-hero-list',
templateUrl: './hero-list.component.html'
templateUrl: './hero-list.component.html',
styleUrls: ['./hero-list.component.css']
})
export class HeroListComponent implements OnInit {
heroes: Observable<Hero[]>;
Expand Down
4 changes: 1 addition & 3 deletions aio/content/examples/reactive-forms/src/index-final.html
Expand Up @@ -5,10 +5,8 @@
<title>Hero Form</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- #docregion bootstrap -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
<!-- #enddocregion bootstrap -->
<link rel="stylesheet" href="styles.css">

<script src="node_modules/core-js/client/shim.min.js"></script>

Expand Down
2 changes: 0 additions & 2 deletions aio/content/examples/reactive-forms/src/index.html
Expand Up @@ -5,9 +5,7 @@
<title>Hero Form</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #docregion bootstrap -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
<!-- #enddocregion bootstrap -->
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions aio/content/examples/reactive-forms/src/styles.1.css
@@ -0,0 +1 @@
@import url('https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css');