Home

Awesome

ngCroppie - Angular Croppie Tool

Build Status Bower version NPM version Dependency Status NPM Montly Downloads MIT License

Angular Croppie Tool is an image cropping and rotating module for AngularJS based on Croppie.js<br> Pure Javascript implementation; Also responsive!

Dependencies

Installation

# Using bower:
$ bower install ngCroppie

# Using npm:
$ npm install ng-croppie

Basic usage

Demo

Example

JS

function ExampleCtrl() {
  var vm = this;

  vm.inputImage = null;
  vm.outputImage = null;

  vm.onUpdate = function(data) {
    //console.log(data);
  };
}

angular
  .module('exampleModule', ['ngCroppie'])
  .controller('ExampleCtrl', [ExampleCtrl]);

HTML

<ng-croppie   src="inputImage"
              ng-model='outputImage'
              update='onUpdate'
              boundry="{w: 400, h: 400}"
              viewport="{w: 300, h: 300}"
              orientation="true"
              rotation="90"
              type="circle">
</ng-croppie>



<!-- Preview -->
<img ng-src="{{outputImage}}" />

Parameters

Version

1.2.2

Updates

Contributors

License

MIT © ngCroppie

<!-- from david-dm [depstat-url]: https://david-dm.org/allenRoyston/ngCroppie [depstat-image]: https://david-dm.org/allenRoyston/ngCroppie.svg --> <!-- [![DevDependencies Status][devdepstat-image]][devdepstat-url] [devdepstat-url]: https://david-dm.org/allenRoyston/ngCroppie?type=dev [devdepstat-image]: https://david-dm.org/allenRoyston/ngCroppie/dev-status.svg -->