import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-step', template: `

{{ step.prompt }}

` }) export class StepComponent implements OnInit { @Input() step: Step; ngOnInit() { console.log("Step", this.step); } update() { console.log(this.step.fields); /* Check for completeness */ for (let field of this.step.fields) { if (!field.ok) { this.step.ok = false; return; } } this.step.ok = true; } }