I have the following directive:
angular.module('app').directive("layer", function () {
return {
restrict: 'E',
templateUrl: 'tpl/directive/layers.html',
scope:{
width: '=',
height: '='
}
}
});
The template is simply a canvas:
<canvas style="position: relative;" class=" " height="" width="" ></canvas>
Now as you might have guessed i wish to set the canvas width and height equal to the attributes set on the <layer> element
im just not quite sure how to do this?
{{width}}&{{heigh}}where ever you want to set it on template'tpl/directive/layers.html'likewidth="{{width+ 'px'}}"&height="{{height+ 'px'}}"