import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'app-radio', template: `
` }) export class RadioComponent implements OnInit { @Input() field: Field; @Output() update: EventEmitter = new EventEmitter(); ngOnInit() { console.log("Text", this.field.id); } check() { this.field.ok = true; this.update.emit(); } }