ngx-counter-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.0Β β€’Β PublicΒ β€’Β Published

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 🧱

Option Type
step Number - Increment or decrease of the number
counterRangeMin Number - Counter minimum
counterRangeMax Number - Counter maximum
counterValue Number - 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>

Readme

Keywords

none

Package Sidebar

Install

npm i ngx-counter-input

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

125 kB

Total Files

26

Last publish

Collaborators

  • lotus18