Directive that allows ng-attr-*
to bind to case sensitive attributes. See example usage below.
Provides a fix for issue discussed in angular/angular.js#1925
Using bower
bower install --save stanleygu/case-sensitive
Including into your Angular module
angular.module('myModule', ['sg.case.sensitive']);
SVG is picky about case for its attributes, such as refX
and refY
. Using ng-attr-refX={{myVal}}
by default decapitalizes the attribute and results in refx="myVal"
, which breaks the SVG. The case-sensitive
directive lets you pass through case sensitive attributes.
<marker case-sensitive="refX,refY" viewBox="0 0 10 10" markerWidth="30"
markerHeight="30" ng-attr-refX="{{ref.x}}" ng-attr-refY="{{ref.y}}" orient="auto">
</marker>