i have a div which is contain an image and i need to view it in another div which is in another component (in angular ) i'm starting with this code:
Update:
image: ImageData;
@Output() sendimage = new EventEmitter<ImageData>();
You try this
Child component e.g. app-child
@Output() sendImage: EventEmitter<ImageData>;
constructor() {
this.sendImage= new EventEmitter<ImageData>();
}
send() {
this.sendImage.emit(this.image);
}
Parent component Template
<app-child
(sendImage) = "receiveIamge($event)"
></app-child>
And its controller:
receiveImage(image: ImageData) {
// your process here
}