angularjs - Is there a better way of doing 'element[0]' -
in link function of directives, i'm having element[0] select actual element. there more elegant way this?
for example, directive <canvas my-directive></canvas>
.
var link = function (scope, element) { var ctx = element[0].getcontext('2d'); // maybe element.first().getcontext('2d') instead? };
Comments
Post a Comment