Angular 2 ngModel in child component updates parent component property
We can use the [(x)] syntax in the parent template to achieve two-way databinding with the child. If we create an Output property with the name xChange, Angular will automatically update the parent property. We do need to emit() an event whenever the child changes the value however: import {Component, EventEmitter, Input, Output} from ‘angular2/core’ … Read more