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.
ng2-tagsinput
Advanced tools
An improved version of angular2-tag-input
Install it from npm:
npm install ng2-tagsinput
System.config({
...
map: {
...
'ng2-tagsinput': 'node_modules/ng2-tagsinput',
...
}
...
packages: {
...
'ng2-tagsinput': { defaultExtension: 'js', main:'index' }
...
}
...
});
import {Ng2TagsInputModule} from 'ng2-tagsinput';
...
@NgModule({
imports: [...,Ng2TagsInputModule]
})
...
Use in template like below
<tag-input
placeholder="Add tags ..."
[model]="tagsArray"
(tagsChanged)="onTagsChange($event)"
(tagsAdded)="onTagsAdded($event)"
(tagRemoved)="onTagRemoved($event)"
>
Where model is the array of elements which will have the resulting tags list. tagsChanged is fired whenever tags list changes i.e. tags are added or removed.
model
: string[]
- Model you want the tags list to bind to.placeholder
: string
- Default: 'Add a tag'
- Placeholder for the <input>
tag.delimiterCode
: Array<number>
- Default: '[188]'
- Array of ASCII keycodes to split tags on. Defaults to comma.addOnBlur
: boolean
- Default: true
- Whether to attempt to add a tag when the input loses focus.addOnEnter
: boolean
- Default: true
- Whether to attempt to add a tag when the user presses enter.addOnPaste
: boolean
- Default: true
- Whether to attempt to add a tags when the user pastes their clipboard contents.allowedTagsPattern
: RegExp
- Default: /.+/
- RegExp that must match for a tag to be added.tagsChanged
: string[]
- Fires when tags list is changed in any way.tagsAdded
: string[]
- Fires when tags are added.tagRemoved
: string[]
- Fires when tag is removed.FAQs
Typescript component for Tag Input
The npm package ng2-tagsinput receives a total of 27 weekly downloads. As such, ng2-tagsinput popularity was classified as not popular.
We found that ng2-tagsinput demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.