🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

angular2-resizing-cropping-image

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-resizing-cropping-image

Resizing and cropping images with Angular 4

1.0.0-final.3
100

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Version published
Weekly downloads
41
-51.19%
Maintainers
1
Weekly downloads
 
Created

Resizing & cropping images with Angular 2

demo

Install

# install the repo with npm
npm install angular2-resizing-cropping-image

Example

# import
import { lyResizingCroppingImagesModule } from 'angular2-resizing-cropping-image';
@NgModule({
    imports : [LyResizingCroppingImagesModule, ...],
})
import { Component } from '@angular/core';

@Component({
  selector: 'image-upload',
  styles: [`
    :host{
      display: block
    }
    `],
  template: `
  <input (change)="_img.imgChange($event)" type="file">

  <button (click)="_img.zoom('+')">+</button>
  <button (click)="_img.zoom('-')">-</button>
  <button (click)="_img.center()">center</button>

  <ly-cropping-img #_img format="png"></ly-cropping-img>
  <div>Format input: {{_img._img.type}}</div>
  <br />
  <div>Format output: {{_img.format}}</div>
  <br />
  <div>Result: </div>
  <br />
  <img [src]="_img.imgCrop">
  <br />
  <input [(ngModel)]="_img.sizeW" placeholder="_img size W">
  <input [(ngModel)]="_img.sizeH" placeholder="_img size H">
  <input [(ngModel)]="_img.img" placeholder="Img">
  `
})
export class imgUpload {
  constructor(){

  }
}

FAQs

Package last updated on 16 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts