# ngx-selectx

> Angular wrapper for select2

Latest version **1.0.6** (published 2021-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-selectx
pnpm add ngx-selectx
yarn add ngx-selectx
bun add ngx-selectx
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-01-13 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | frazanwer-arch |
| Keywords | angular2, select2, wrap |

## Links

- npm: https://www.npmjs.com/package/ngx-selectx
- npm.io page: https://npm.io/package/ngx-selectx

## Dependencies (3)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [@types/jquery](https://npm.io/package/@types/jquery.md) ^3.5.5
- [@types/select2](https://npm.io/package/@types/select2.md) ^4.0.53

## Recent versions

- 1.0.6 (latest) — 2021-01-13
- 1.0.5 — 2021-01-13
- 1.0.4 — 2021-01-13
- 1.0.3 — 2021-01-13
- 1.0.2 — 2021-01-13
- 1.0.1 — 2021-01-13
- 1.0.0 — 2021-01-13

## README

# Angular wrapper for Select2 (ngx-selectx)

  [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)

For Angular version 9.x.x and up


## Prerequisites

For this plugin to work you need to add two javascript libraries to your project
- [Jquery](https://jquery.com/download/)
- [Select2](https://select2.github.io/)

 
## Installation

Add package to your project `npm i -S ngx-selectx` (this will save package to your `dependencies` in `package.json`)


## Basic implementation

1) Add declaration to [NgModule] 
```
import { Select2Module } from 'ngx-selectx';

@NgModule({
  imports: [
    ....,
    Select2Module
  ],
  ...
})
```

2) Add it to your [template].
 You need to define at least `data` as `@Input`.

 

```
<select2 [data]="exampleData"></select2>
```


## Options

### Inputs
* **data** `Array<Select2OptionData>`: Data used for generating select 2 - [inferface definition] 
* **value** `string`: Default value for select 2
* **cssImport** `boolean`: Disable or enable default style for select 2, default value is `false`
* **width** `string`: Set width for the input, default value is `resolve`
* **disabled** `boolean`: Disable select2, default value is `false`
* **options** `Select2Options`: Set options for select 2, [all available options] 
### Outputs
* **valueChanged** `string`: Emitted when value changes in select 2 drop down

---
_Source: https://npm.io/package/ngx-selectx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
