Torgeir Helgevold 3cb219c5ab docs(dynamic-cookbook): upgrade to use new forms api
convert exiting to use deprecated name

converted to new api

text

warnings

fix plunker

text

test weak

text

space

text

lint

order

tweak
2016-06-20 21:02:28 -04:00

25 lines
580 B
TypeScript

// #docregion
import { Component } from '@angular/core';
import { DynamicFormComponent } from './dynamic-form.component';
import { QuestionService } from './question.service';
@Component({
selector: 'my-app',
template: `
<div>
<h2>Job Application for Heroes</h2>
<dynamic-form [questions]="questions"></dynamic-form>
</div>
`,
directives: [DynamicFormComponent],
providers: [QuestionService]
})
export class AppComponent {
questions: any[];
constructor(service: QuestionService) {
this.questions = service.getQuestions();
}
}