Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom Dropdown Component
export class CustomDropdownComponent implements OnInit,
ControlValueAccessor {
options: string[];
selectedOption: string;
constructor() { }
ngOnInit() {
this.options = [
'option 1',
'option 2',
'option 3',
];
this.selectedOption = this.options[0];
}
writeValue() { }
registerOnChange() { }
registerOnTouched() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.