public close(event: any) {
// Fired when the editor is closed.
console.log(event);
}
public getEditedFile(file: File) {
// Fired when the file has been processed.
console.log(file);
}
app.module.ts
import { NgxImageEditorModule } from "ngx-image-editor";
Angular7
Can't bind to 'config' since it isn't a known property of 'ngx-image-editor'.
component.html
<ngx-image-editor [ERROR ->][config]="config" (close)="close($event)" (file)="getEditedFile($event)">>"):
component.ts file public config = { ImageName: 'Some image', AspectRatios: ["4:3", "16:9"], ImageUrl: 'https://static.pexels.com/photos/248797/pexels-photo-248797.jpeg', ImageType: 'image/jpeg' }
app.module.ts import { NgxImageEditorModule } from "ngx-image-editor";
@NgModule({ declarations: [ ], imports: [ NgxImageEditorModule, ], providers: [
], bootstrap: [AppComponent] }) export class AppModule { }
package.json "ngx-image-editor": "1.4.1", "cropperjs": "^1.3.5", "@angular/flex-layout": "^5.0.0-beta.14", "@types/cropperjs": "1.1.3", "@angular/cdk": "^7.3.7", "@angular/common": "^7.2.15", "@angular/compiler": "^7.2.15", "@angular/compiler-cli": "^7.2.15", "@angular/core": "^7.2.15", "@angular/material": "^7.3.7",