Even though a dropdown (select-option) is a pretty common utility but it still doesn't support basics such as search.
npm install angular-dropdown-component
npm install angular-dropdown-component
`
Include the library into your app module-
`
import 'DropdownModule' from 'angular-tabs-component';
`
Add it to your @NgModule imports-
`
@NgModule({
imports: [
BrowserModule
...,
...,
DropdownModule
],
declarations: [...],
...
})
`
Usage
`
dummyData = [{
id: 1,
name: "Foo"
}, {
id: 2,
name: "Bar"
}]
`
Options
Apart from the default settings, there are a number of options that can be
specified for the dropdown components. Options are specified by directly adding it to the
element as attribute with property binding, attribute binding and event binding.
Possible options are:
* data (property): To set the data of that dropdown (required).
* selectedOption (property, supports two way binding): To set any option as the selected option -
Usage:
`
`
* disabled (property): To set the dropdown disabled.
Usage:
`
`
* dTitle (property): To set the header.
Usage:
`
`
* filter (property): To set the filter on/off.
Usage:
`
``