I am currently using Ionic v3 with TypeScript.
My goal is to store the file_url in an array after checking if its width is equal to twice its height.
However, I am encountering an error:
The 'name_array' property does not exist on the 'HTMLElement' type.
Below is my code snippet:
let img = new Image();
img.src = file_url;
img.onload = function () {
if( img.width == (img.height * 2) ){
this.name_array.push({ id: 1, url: file_url });
}
};
Can someone please guide me on how to successfully push the file URL into my array?
Thank you!