I've an image element like this:
<img #imgElement *ngIf="data.image" [src]="data.image" width=200 />
I intend to print the dimensions of the image right below it, like
{{imgElement.naturalWidth}} x {{imgElement.naturalHeight}}
However I get the error:
Property 'imgElement' does not exist on type MyComponent.
Is there a way to achieve this without having a @ViewChild('imgElement')
in the component?