0.0.15 • Published 5 years ago
persian-seperated-input v0.0.15
PersianSeperatedInput

Create seperated input which support persian numbers for iphone numeric keyboard. This library was generated with Angular CLI version 9.1.13.
Installation
npm install --save persian-seperated-input
Usage
Add PersianSeperatedInputModule to imports app.module.ts like
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import {PersianSeperatedInputModule} from 'persian-seperated-input'
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
PersianSeperatedInputModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }Add component to your page:
<psi-input (onInputChange)="onInputChange($event)" [digitOnly]="true"></psi-input>Updating component value using setValue method
<psi-input #myInput (onInputChange)="onInputChange($event)"
[digitOnly]="true"></psi-input>
<button (click)="onClearClick()">clear</button>then in your component reference using @ViewChild and call setValue method.
@ViewChild('myInput') myInput:any;
onClearClick(){
this.myInput.setValue('');
}