# ng-custom-checkbox-values

> Custom checkbox values like strings or numbers other than default boolean

Latest version **1.0.5** (published 2020-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-custom-checkbox-values
pnpm add ng-custom-checkbox-values
yarn add ng-custom-checkbox-values
bun add ng-custom-checkbox-values
```

## 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.5 |
| Published | 2020-03-03 |
| First published | 2020-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 85.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Darshan Sagar |
| Maintainers | darshanlsagar |
| Keywords | angular, custom, checkbox, values, directive, non boolean values checkbox |

## Links

- npm: https://www.npmjs.com/package/ng-custom-checkbox-values
- Repository: https://github.com/darshanlsagar/angular-custom-checkbox-values
- Homepage: https://github.com/darshanlsagar/angular-custom-checkbox-values#readme
- Issues: https://github.com/darshanlsagar/angular-custom-checkbox-values/issues
- npm.io page: https://npm.io/package/ng-custom-checkbox-values

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 1.0.5 (latest) — 2020-03-03
- 1.0.4 — 2020-03-03
- 1.0.3 — 2020-03-02
- 1.0.2 — 2020-03-02
- 1.0.1 — 2020-03-02
- 1.0.0 — 2020-02-12

## README

# angular-custom-checkbox-values
Custom checkbox values like strings or numbers other than default boolean

## Install

```shell
$ npm i ng-custom-checkbox-values
```

## Usage

Presently works with angular reactive form components only.

Add CustomCheckboxValuesDirective to NgModule

```ts

import { CustomCheckboxValuesDirective } from "ng-custom-checkbox-values";

@NgModule({
	declarations: [
		CustomCheckboxValuesDirective,
		...
	]
	...
}

```
Provide checkedValue, uncheckedValue, indeterminateValue with formControl to checkbox field

```html
<input type="checkbox" checkedValue="Y" uncheckedValue="N" indeterminateValue="I" [formControl]="status"/>

```
OR
```html
<input type="checkbox" [checkedValue]="checkVal" [uncheckedValue]="unCheckVal" [indeterminateValue]="indetermVal" [formControl]="status"/>

```

## Author

[DarshanKumar L Sagar](https://github.com/darshanlsagar)

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