Skip to content

Instantly share code, notes, and snippets.

@Kalpesh300
Created December 12, 2019 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kalpesh300/23fbbfc5ac16ee58b04a1739ad8fc2ee to your computer and use it in GitHub Desktop.
Save Kalpesh300/23fbbfc5ac16ee58b04a1739ad8fc2ee to your computer and use it in GitHub Desktop.
Custom Dropdown Component
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-custom-dropdown',
templateUrl: './custom-dropdown.component.html',
styleUrls: ['./custom-dropdown.component.scss']
})
export class CustomDropdownComponent implements OnInit {
options: string[];
selectedOption: string;
constructor() { }
ngOnInit() {
this.options = [
'option 1',
'option 2',
'option 3',
];
this.selectedOption = this.options[0];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment