Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ngx-type-ahead
Advanced tools
Typeahead multi-select dropdown component for angular. Demo
The version 2.x.x is for Angular 6+. If you are using older version of Angular (v2-v5) please use previous version.
npm install --save ngx-type-ahead
Type ahead uses (observable) array of items to suggest value to user based on current value of the input.
Items can be simple strings or they could be objects. Here is a brief list of functionality:
view value
and which is value indentifier
.In order to use ngx-type-ahead
you need to import the module and simply place component in your template.
@NgModule({
imports: [
TypeaheadModule
],
bootstrap: [AppComponent]
})
export class AppModule { }
<type-ahead formControlName="myControl" [suggestions]="mySuggestions"></type-ahead>
Type-ahead
supports following properties:
suggestions: TypeaheadSuggestions
- List or observable list of elements which represent set of possible suggestions. For more information on type check TypeaheadSuggestions.[]
.itemTemplate: TemplateRef
- Custom template template for items in suggestions list and badges in multi select scenario. Exposed properties are item
and index
.custom: boolean
- Flag indicating whether custom values are allowed.true
.multi: boolean
- Flag indicating whether control accepts multiple values/array of values.false
.complex: boolean
- Flag indicating whether suggestion represents an Object instead of simple string.false
.idField: string
- Only for complex
suggestions. Object's indicator property name used as a value for form component. Can be just in combination with multi
, but automatically cancels custom
.id
.nameField: string
- Only for complex
suggestions. Object's name property. This value will be shown in dropdown and in the input, but idField
will be saved to form.name
.settings: TypeaheadSettings
- Additional typeahead settings, mostly style related that will most likely be shared among different type-ahead
elements.Type representing suggestions. Can be:
export interface TypeaheadSettings {
/** how much should be user's typing debounced */
typeDelay: number; // Default is `50`
/** maximal number of visible items in dropdown. If value is 0, list will not be limited */
suggestionsLimit: number; // Default is `10`
/** text shown when there are no matches */
noMatchesText: string; // Default is `No matches found`
/** css classes for parts of type-ahead */
tagClass: string; // Default is `btn badge badge-primary`
tagRemoveIconClass: string; // Default is ``
dropdownMenuClass: string; // Default is `dropdown-menu`
dropdownMenuExpandedClass: string; // Default is `dropdown-menu show`
dropdownMenuItemClass: string; // Default is `dropdown-item`
dropdownToggleClass: string; // Default is `dropdown-toggle`
}
Licensed under MIT
FAQs
Typeahead multi-select dropdown component for angular
The npm package ngx-type-ahead receives a total of 120 weekly downloads. As such, ngx-type-ahead popularity was classified as not popular.
We found that ngx-type-ahead demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.