1.2.0 • Published 2 years ago

ngx-boolean-input v1.2.0

Weekly downloads
41
License
MIT
Repository
github
Last release
2 years ago

ngx-boolean-input

➕ Install

npm install ngx-boolean-input

🤓 How to use

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;
}
<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

📝 Note

This library was generated with Nx.