@@ -1,6 +1,6 @@
|
||||
// #docregion
|
||||
import { Component } from '@angular/core';
|
||||
import { HeroFormComponent } from './hero-form.component'
|
||||
import { HeroFormComponent } from './hero-form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
|
||||
@@ -41,7 +41,7 @@ export class HeroFormComponent {
|
||||
this.model = new Hero(42, '', '');
|
||||
// #enddocregion new-hero-v1
|
||||
this.active = false;
|
||||
setTimeout(()=> this.active=true, 0);
|
||||
setTimeout(() => this.active = true, 0);
|
||||
// #docregion new-hero-v1
|
||||
}
|
||||
// #enddocregion new-hero-v1
|
||||
@@ -51,7 +51,7 @@ export class HeroFormComponent {
|
||||
|
||||
// Reveal in html:
|
||||
// Name via form.controls = {{showFormControls(heroForm)}}
|
||||
showFormControls(form:NgForm){
|
||||
showFormControls(form: NgForm) {
|
||||
|
||||
return form && form.controls['name'] &&
|
||||
// #docregion form-controls
|
||||
|
||||
Reference in New Issue
Block a user