ngx-sign-pad is an Angular wrapper for szimek/signature_pad.
This is a fork of https://github.com/HeicoJoswig/ngx-sign-pad to make it ng 9 compatible.
npm install ngx-sign-pad --save
import { SignPadModule } from 'ngx-sign-pad';
...
@NgModule({
declarations: [ ],
imports: [ SignPadModule ],
providers: [ ],
bootstrap: [ AppComponent ]
})
import { Component, ViewChild } from '@angular/core';
import { EImageType, SignPadComponent } from 'ngx-sign-pad';
@Component({
template: '<ngx-sign-pad [(signature)]="signature" [type]="imageTypes.SVG"></ngx-sign-pad>'
})
export class AppComponent{
imageTypes = EImageType;
signature = null;
@ViewChild(SignPadComponent) signaturePad: SignPadComponent;
constructor() {
}
clear() {
this.signaturePad.clear();
}
}