title: How to get the height and width of an image in Angular 2(or above) from input tag before uploading it to the server without jQuery?
body: <p>I checked various sources but most of the solutions are in jQuery. I want the solution in Typescript if possible.</p>
  
  <p>HTML - </p>
  
  <p><code>&lt;input #coverFilesInput class="file-input" type="file"(change)="onChange($event)"....&gt;</code></p>
  
  <p>Typescript - </p>
  
  <pre><code>onChange($event) { let img = event.target.files[0]; // and then I need code to validate image size }
  </code></pre>
  
  <p>Is there a solution or am I doing it completely wrong?</p>