Package Exports
- @stumpam/ngx-cz-tel
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stumpam/ngx-cz-tel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NgxCzTel
Angular masked input for czech/slovak phone numbers.
Automatically adds +42(0|1) as prefix.
Emits on validity change only null or full phone number.
Quick Start
- Import NgxCzTel to your project
import { NgxCzTelModule } from '@stumpam/ngx-cz-tel';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgxCzTelModule, ReactiveFormsModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}- Use in HTML template
<ngx-cz-tel [formControl]="ctrl"></ngx-cz-tel>Works with formly
If you want to add attributes directly to input element make custom Formly field and initialize it on ngOnInit
ngOnInit() {
this.attributes = {
id: this.id,
...this.to.attributes,
};
}and use it in the template
<ngx-cz-tel [formControl]="formControl" [attributes]="attributes"></ngx-cz-tel>⚠ Caution
Attributes are bound just once on ngOnIput hook. Changes are matter of future improvements.