I have a problem with typing the SVG path d = "". I do not understand this message of error.
html:
<svg style="height:300px">
<path d="{{ room.coordinate }}" ng-repeat="room in rooms" fill="blue" stroke="black" stroke-width="2"></path>
</svg>
SVG path: M 150 0 L75 200 L225 200 Z
Error:
Error: Invalid value for <path> attribute d="{{ room.coordinate }}" jquery.min.js:3
Error: Invalid value for <path> attribute d="{{ room.coordinate }}" angular.min.js:23
This relates to this question: D3 Integration with Angular: "Error: Invalid value for <rect> attribute x"
And this issue: https://github.com/angular/angular.js/pull/2061
For every <svg>
attribute, ng-attr-<name>={{<evaluated value>}}
should be used instead of <name>={{<evaluated value>}}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With