score:6

Accepted answer

You can't have the canvas as the root element and then try to access it in the way you're doing it.

Wrap it in another div to quickly solve your problem:

"<div><canvas width='200' height='200' class='{{$ctrl.class}}'></canvas></div>"

Related Query

More Query from same tag