1.0.6 • Published 2 years ago

@numetalsour/ngx-number v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Angular 14+ Number(input only numbers)

format(onkey) & custom format

Install project with npm

  npm i @numetalsour/ngx-number --save

Parameters

attributestypedefault value
allowDecimalsbooleanfalse
allowSignbooleanfalse
decimalSeparatorstring'.'
canPastebooleantrue

Usage

...
import { NgxNumberModule } from '@numetalsour/ngx-number';
...

@NgModule({
    declarations: [
        AppComponent,
    ],
    imports: [
        ...
        NgxNumberModule
        ...
    ]
})
export class AppModule { }

Example

<form [formGroup]="form">
    <mat-form-field>
        <mat-label>Number</mat-label>
        <input 
            matInput 
            formControlName="number"
            ngxNumber 
            [allowDecimals]="false" 
            [allowSign]="false" 
            [decimalSeparator]="'.'"  
            [canPaste]="true" >
    </mat-form-field>
</form>


<input ngxNumber [(ngModel)]="rut" >
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago