Custom-Control

The library enabling two way data binding with formating. Validation based on the type of format of input.

Demo | StackBlitz example | Documentation

Installing and usage

npm install custom-control --save
Load the module for your app:
import { CustomControlModule } from 'custom-control';

@NgModule({
  ...
  imports: [
    ...
    CustomControlModule
  ]
})
Use it in component:
input = {
    name: 'Number Field - 2 decimal places',
    value: 452354,
    format: 'number',
    places: '2',
    readOnly: false
}
<c-input class="input-fields"
    [(model)]="input.value" 
    [format]="input.format" 
    [places]="input.places" 
    [readOnly]="input.readOnly" 
    (modelChange)="dataChange($event, input.value)">
</c-input>
Test