3.3.3 • Published 2 years ago
@stumpam/ngx-masked-input v3.3.3
NgxMaskedInput
Angular Date masked input directive for now just for numbers. It can handle string prefixes and suffixes;
Quick Start
- Import NgxMaskedInputModule to your project.
import { NgxMaskedInputModule } from '@stumpam/ngx-masked-input';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgxMaskedInputModule, ReactiveFormsModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
- Use in HTML template
<input ngxMaskedInput [formControl]="ctrl" [options]="options">
- Set up in parent component
// Except type are all fields optional
options: MaskedInputOptions = {
// For now just for numeric inputs! Default value, is not necessary to set.
type: 'numeric';
// Prefix string
prefix: string;
// Whether it will place a space between prefix and number
appendPrefix: boolean;
// Suffix string
suffix: string;
// Whether it will place a space between suffix and number
prependSuffix: boolean;
// Whether it should separate thousands
separateThousands: boolean;
// Thousands separator, default <space>
separator: string;
// Minimum number
min: number;
// Maximum number
max: number;
// Emit just number without prefix or suffix, default true
emitNumber: boolean;
// If true leaves at first input empty, default false
startEmpty: boolean;
};
Works with formly
3.3.3
2 years ago
3.3.2
2 years ago
3.3.1
2 years ago
3.3.0
2 years ago
3.2.3
3 years ago
3.2.2
3 years ago
3.2.1
3 years ago
3.2.0
3 years ago
3.1.7
3 years ago
3.1.6
3 years ago
3.1.2
3 years ago
3.1.5
3 years ago
3.1.4
3 years ago
3.1.1
3 years ago
3.1.0
3 years ago
3.0.2
3 years ago
3.0.0
4 years ago
2.2.0
4 years ago
2.0.0
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago