Skip to content

A simple checkbox that uses a css "hack" to display text content instead of the conventional checkbox, to be used in Angular2 projects.

Notifications You must be signed in to change notification settings

Sn3b/ng2-font-awesome-checkbox

Repository files navigation

ng2-font-awesome-checkbox

A simple checkbox that uses a css "hack" to display text content (to use a FontAwesome icon) instead of the conventional checkbox, to be used in Angular2 projects.

Demo

Usage:

Model-driven form:

<form [formGroup]="myForm">
  <ng2-font-awesome-checkbox formControlName="doctor" [icon]="'fa-user'" [color]="'blue'" [size]="'25px'"></ng2-font-awesome-checkbox>
</form>
this.myForm = new FormGroup({
  user: new FormControl(true)
});

Template-driven form:

<form #myForm="ngForm">
  <ng2-font-awesome-checkbox [(ngModel)]="myModel" [icon]="'fa-user'" name="myControl" #myControl="ngModel"></ng2-font-awesome-checkbox>
</form>

About

A simple checkbox that uses a css "hack" to display text content instead of the conventional checkbox, to be used in Angular2 projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published