# ngx-boolean-input

> A simple Angular decorator for boolean inputs.

Latest version **1.2.0** (published 2022-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-boolean-input
pnpm add ngx-boolean-input
yarn add ngx-boolean-input
bun add ngx-boolean-input
```

## 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.2.0 |
| Published | 2022-06-28 |
| First published | 2019-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steffen Köhler |
| Maintainers | steffenkoehler |
| Keywords | angular, javascript, typescript, decorator, boolean, input |

## Links

- npm: https://www.npmjs.com/package/ngx-boolean-input
- Repository: https://github.com/SteffenKoehler/ngx-boolean-input
- Issues: https://github.com/SteffenKoehler/ngx-boolean-input/issues
- npm.io page: https://npm.io/package/ngx-boolean-input

## Dependencies (1)

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

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2022-06-28
- 1.1.0 — 2020-07-01
- 1.0.1 — 2019-11-22

## README

# ngx-boolean-input

## ➕ Install

```sh 
npm install ngx-boolean-input
```

## 🤓 How to use

```typescript
import { BooleanInput } from 'ngx-boolean-input';

@Component({
  selector: 'app-component',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})

export class AppComponent {

  @Input()
  @BooleanInput()
  editable: boolean | string | undefined;
}
```

```html
<app-component></app-component> <!-- false -->
<app-component editable></app-component> <!-- true -->
<app-component [editable]="false"></app-component> <!-- false -->
<app-component editable="false"></app-component> <!-- false -->
<app-component [editable]="true"></app-component> <!-- true -->
```

## 💡 Inspiration

* Dominic Elm
https://dev.to/angular/decorators-do-not-work-as-you-might-expect-3gmj
* michaeljota https://github.com/angular/angular/issues/14761


## 📝 Note

This library was generated with [Nx](https://nx.dev).

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