https://github.com/twhitbeck/angular-cropper
Touch-enabled image cropper for AngularJS
https://github.com/twhitbeck/angular-cropper
angular cropper
Last synced: 11 months ago
JSON representation
Touch-enabled image cropper for AngularJS
- Host: GitHub
- URL: https://github.com/twhitbeck/angular-cropper
- Owner: twhitbeck
- License: mit
- Created: 2014-09-04T14:40:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-31T11:57:30.000Z (over 8 years ago)
- Last Synced: 2024-10-19T19:54:23.677Z (over 1 year ago)
- Topics: angular, cropper
- Language: HTML
- Size: 10.7 KB
- Stars: 24
- Watchers: 8
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
angular-cropper
===============
> Touch-enabled image cropper for AngularJS
[Demo](http://plnkr.co/edit/s96ZCYmP5ELtqdIMieKC?p=preview)
### Get it
```sh
$ bower install angular-cropper
```
or
```sh
$ npm install angular-cropper
```
### Use it
* Include files in your html
* `bower_components/angular-file-reader/angular-file-reader.js`
* `bower_components/angular-cropper/angular-cropper.js`
* Include `tw.directives.cropper` in your module dependencies
* `angular.module('myApp', ['tw.directives.cropper']);`
* Place the `tw-cropper` attribute on a canvas
* ``
* Give your cropper a `source`
* ``
* `source` must be a File
* See the demo for one way to get a File to your scope
* Or use [twhitbeck/angular-file-input](https://github.com/twhitbeck/angular-file-input)
* Get the dataURL of your crop with controller `toDataURL` method
* `Save`
* That's it!