Horje
How to Solve Property ‘getContext’ does not exist on type ‘HTMLElement’ error in Angular 12 & TypeScript Code Example
How to Solve Property ‘getContext’ does not exist on type ‘HTMLElement’ error in Angular 12 & TypeScript
...
let canvas: HTMLCanvasElement = document.getElementById("myChart") as HTMLCanvasElement;
// We can also do like this // let canvas: HTMLCanvasElement = <HTMLCanvasElement>document.getElementById("myChart");
// This one is accepted but not recommended // let canvas: any = document.getElementById("myChart");
this.ctx = canvas.getContext('2d');
...
Source: howtojs.io




Whatever

Related
ls order by filename length Code Example ls order by filename length Code Example
resubmit prevent Code Example resubmit prevent Code Example
mysql database manager Code Example mysql database manager Code Example
sbt debian Code Example sbt debian Code Example
close keyboard in fragement android studio Code Example close keyboard in fragement android studio Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7