Source @ https://github.com/dimpu/angular2-signature-pad
angular2-signature-pad contains SignaturePadModule for Angular 2.
Additionally we use signature_pad for this component.
Install angular2-signature-pad
from npm
:
npm install angular2-signature-pad --save
or using yarn
:
yarn add angular2-signature-pad
angular-cli
— please refer to Getting started withangular-cli
angular-seed
— please refer to Getting started withangular-seed
system.js
(and Angular 2 QuickStart) — please checkout sample repositorywebpack
— you can view our demo page source codeplnkr
— sample available hereAoT
usingngc
androllup
— please refer to How to useangular2-signature-pad
in Angular 2 withAoT
compilation usingngc
androllup
Main source of API documentation and usage scenarios is available at https://dimpu.github.io/angular2-signature-pad/.
Is very welcome! And remember, contribution is not only PRs and code, but any help with docs or helping other developers to solve issues are very appreciated! Thanks in advance!
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SignaturePadModule } from 'angular2-signature-pad';
import { AppComponent } from '../src/app.component';
@NgModule({
imports: [
BrowserModule,
SignaturePadModule,
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
<signature-pad
(onSave)="onSaveHandler($event)"
(onClear)="onClearHandler()"
[width]="width"
[height]="height"
[hideFooter]="noFooter"
[formDataURL]="dataUrlVar"
[label]="label"></signature-pad>
You can find a working example inside the demo
directory.
To serve it locally, run:
git clone https://github.com/dimpu/angular2-signature-pad.git
npm i
npm run demo.serve