Given a simple input element I can do this:
<input [(ngModel)]="name" /> {{ name }}
This doesn't work for my custom elements:
<my-selfmade-combobox [(ngModel)]="name" values="getValues()" required></my-selfmade-combobox>
How can I implement it?
I think this link will answer your question:
We need to implement two things to achieve that:
ControlValueAccessor
that will implement the bridge between this component and ngModel
/ ngControl
The previous link gives you a complete sample...