How to correctly pass props to a component with RxJS in Angular 4?
Here is my component: @Component({ selector: 'bc-goods-detail', template: ` <span>good id: {{good?.id}}</span> <input [value]="good?.name" (input)="onInput($event)" /> <button (click)="onClick()">Save</button> `, styles: [] }) export class GoodsDetailComponent { @Input() good: Good; @Output() save = new EventEmitter<Good>(); onClick() { this.save.emit(this.good); } onInput ($event) { this.good.name = $event.target.value; } } When I change the name in input and then I am pressing save button and this.good is NOT CHANGED good. It is old good , like it was passed to the component. I started to