Custom input and output on same name in Angular2 2 way binding
For this compact syntax to work the input and output need to follow specific naming rules [(mobile)]=”myParam” @Output(‘mobileChange’) emitter: EventEmitter<string> = new EventEmitter<string>(); @Input(‘mobile’) set setMobileValue(value) { this.msisdn_confirm = this.msisdn = value; } Renaming inputs and outputs by passing a string parameter to the decorator is discourages. Rather use @Output() mobileChange: EventEmitter<string> = new EventEmitter<string>(); … Read more