Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 794 Bytes

README.md

File metadata and controls

42 lines (27 loc) · 794 Bytes

ngCropper

AngularJS module for https://github.com/fengyuanchen/cropper jQuery plugin.

Install

bower install ng-cropper

Usage

<link href="client/bower_components/ngCropper/dist/ngCropper.all.css" rel="stylesheet">
<script src="client/bower_components/ngCropper/dist/ngCropper.all.js"></script>
var app = angular.module('app', ['ngCropper']);

app.controller('Main', function(Cropper) {
    ...
});
<img src="image.jpg"
     ng-cropper
     ng-options="options"
     ng-show="show.cropper"
     ng-hide="hide.cropper">

Read Demo code for detailed example.

API

Look at demo.js to learn workflow.