dropdown-select2
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

dropdown-select2

Install jQuery and Select2JS

Step 1. Query: http://jquery.com/

npm install jquery@1.11.1 --save

Step 2. https://select2.org/

Installation

To install this library, run:

$ npm install dropdown-select2 --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install dropdown-select2

and then from your Angular AppModule:

import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { DropdownSelect2Component, DropdownSelect2Module } from "dropdown-select2";
 
@NgModule({
  imports: [
    CommonModule,
    DropdownSelect2Module
  ],
  exports: [
    DropdownSelect2Component
  ]
})
export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

Your template

<adpp-dropdown-select2 *ngIf="item.plan"
                                       [keyField]="'id'"
                                       [items]="pricePlans" [(model)]="item.plan.id"></adpp-dropdown-select2>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Dinh Hung Pham

Readme

Keywords

none

Package Sidebar

Install

npm i dropdown-select2

Weekly Downloads

0

Version

0.0.4

License

none

Unpacked Size

103 kB

Total Files

26

Last publish

Collaborators

  • hungphambms