项目作者: leye0

项目描述 :
Angular Signature Component
高级语言: TypeScript
项目地址: git://github.com/leye0/AngularSignatureComponent.git
创建时间: 2018-04-12T15:19:36Z
项目社区:https://github.com/leye0/AngularSignatureComponent

开源协议:MIT License

下载


Angular Signature Component

Minimalist signature component for Angular

Getting Started

Copy signature.component.ts in your project (and add it to the declaration of your module-s).
Tweak for your needs.

Usage

  1. <!-- This is a place where the signature pad should be used. -->
  2. <!-- The signature canvas will fill the whole space. In the example, full width and a height of 100px. -->
  3. <div style="border: 1px solid gray; width: 100%; height: 100px;">
  4. <!-- When calling "save", the $event received from the component output is your image as a default data URL as PNG -->
  5. <app-signature (savedSignatureAsDataUrl)="someServiceThatHandlesTheData($event)" #myAwesomeSignaturePad></app-signature>
  6. </div>
  7. <!-- There are two functions: clear and save. -->
  8. <button (click)="myAwesomeSignaturePad.clear()">Clear</button>
  9. <button (click)="myAwesomeSignaturePad.save()">Save</button>

Demo

Plunker