ngx-image-editor
Awesome editor for Angular 6 based on Angular Material
Getting started
Step 1: Install Angular Material (+ Material Icons) and Angular Flex Layout
Step 2: Install cropperjs
npm install --save cropperjs
cropperjs
file paths in your .angular.json
Step 3: Add } "styles": , "scripts": }
ngx-image-editor
:
Step 4: Install npm install --save ngx-image-editor
NgxImageEditorModule
within your app:
Step 5: Import the ; @
Step 6: Use within your application:
API
Property | Description |
---|---|
[config] |
An object containing editor configuration (see Configuration) |
(file) |
The emitted file after editing. |
Configuration
Property | Description |
---|---|
ImageName | Name of the image. |
ImageUrl | URL of the image (if it coming from a CDN) . |
File | File object of the image (if it is being uploaded through the browser. |
ImageType | Type of the image (default is image/jpeg ). |
AspectRatios | Array of aspect ratios. Available options: 0:0 , 1:1 , 2:3 ,4:3 , 16:9 l . (default is 0:0 ) |
Example
Contributors
![]() |
![]() |
---|---|
Hristo Georgiev | Taulant Disha |