import { Component, Input, OnChanges } from '@angular/core';
@Component({
selector: 'image-display',
templateUrl: './image-display.component.html'
})
export class ImageDisplayComponent implements OnChanges {
@Input() image: File;
@Input() imagePath?: string;
private fileReader: FileReader;
constructor() { }
ngOnChanges() {
if (this.image && this.fileReader) {
this.fileReader.readAsDataURL(this.image);
}
}
}
On compiling this with AOT getting below error:
PRINHYLTPAP0592:matata ajays$ ng build --prod --aot
/myApp/src/$$_gendir/app/image-uploader/image-display/image-display.component.ngfactory.ts (61,9):
Supplied parameters do not match any signature of call target.