Created
December 12, 2019 17:00
-
-
Save Kalpesh300/c56896447f3272a0994283abf3226cbe to your computer and use it in GitHub Desktop.
Custom Dropdown Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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