1.0.0 • Published 4 years ago

ngx-counter-input v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

NGX Counter 🐙

Counter for Angular.

  • Works with Reactive Forms! 🎉
  • Compatible with Angular 9 🎆

Installation 🔨

Add in app.module.ts

import { NgxCounterInputModule } from 'ngx-counter-input';

Dependencies:

$ npm install --save @fortawesome/fontawesome-free
$ npm i bootstrap

Styling 💄

To change the colors of the controls:

.time-controls {
	background-color: #new-color !important;
	color: #new-color !important;
}

Options 🧱

OptionType
stepNumber - Increment or decrease of the number
counterRangeMinNumber - Counter minimum
counterRangeMaxNumber - Counter maximum
counterValueNumber - Initial value

Example 🐬

Reactive Forms:

<form [formGroup]="formulario">
	<ngx-counter-input formControlName="time" [step]="15" [counterRangeMin]="15" [counterRangeMax]="240" [counterValue]="15"></ngx-counter>
</form>

NgModel:

<ngx-counter-input [(ngModel)]="time" [step]="15" [counterRangeMin]="15" [counterRangeMax]="240" [counterValue]="15"></ngx-counter>