ng-image-cropper
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

how to use?

step one:
npm i angular-image-croper
step two (in module):
import { ImageCroperModule } from 'angular-image-croper';
 
....
 imports: [
    .....
    ImageCroperModule
  ],
....
step three(in html):
<image-croper #imageCroper></image-croper>
step four(in component):
const image = new Image()
image.src = '/assets/girl.jpeg'
image.onload = () => {
    this.imageCroper.show({
    image
    }).then(file => {
    console.log(file)
    })
}

arguments of show method:

  1. image: [HTMLImageElement] The show method must be called until the image is loaded.
  2. src: src of image,If the image attribute is specified, the src attribute is automatically invalidated.
  3. size: size of cropper window.
  4. extra: [any] use data, will Return intact itself.

Readme

Keywords

none

Package Sidebar

Install

npm i ng-image-cropper

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

527 kB

Total Files

23

Last publish

Collaborators

  • vennnn