How to implement ngModel on custom elements?
[(ngModel)]=”item” is a shorthand for [ngModel]=”item” (ngModelChange)=”item = $event” That means that if you want to add a 2-way bind property to your component, for example <app-my-control [(myProp)]=”value”></app-my-control> All you need to do in your component is add @Input() myProp: string; // Output prop name must be Input prop name + ‘Change’ // Use in … Read more