import { Component, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'child-component', template: ` Child
Input text: {{ childText }}
Output :
Private text: {{ childPrivateText }}
`, }) export default class ChildComponent { @Input() childText = ''; childPrivateText = ''; @Output() onClickChild = new EventEmitter(); }