New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ngx-select2

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-select2

Select2 component for Angular

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

ngx-select2

Select2 component for Angular

peerDependencies Status npm version licence

Usage

  • Add jQuery and Select2 lib
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
  • Install ngx-select2
npm i ngx-select2
  • Use select2 component
import { LSelect2Module } from 'ngx-select2';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    LSelect2Module
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
<l-select2 [(ngModel)]="selected" [data]="data" [options]="options" [disabled]="false" (valueChange)="valueChange($event)"></l-select2>

Options

  • data: select2 init data for select
  • options: select2 options
  • disabled: disable select2 component
  • valueChange: output. Fire on value change, same as ngModelChange

ChangeLog

  • 0.2.0: Add valueChange, Support Angular 6
  • 0.3.0: Support Angular 9

Keywords

Select2

FAQs

Package last updated on 18 Feb 2020

Did you know?

Socket

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.

Install

Related posts