svg <path>的值无效

use*_*659 5 svg angularjs

我输入SVG路径d =""时遇到问题.我不明白这个错误的消息.

HTML:

<svg style="height:300px">
   <path d="{{ room.coordinate }}" ng-repeat="room in rooms" fill="blue" stroke="black" stroke-width="2"></path>
</svg>
Run Code Online (Sandbox Code Playgroud)

SVG路径:M 150 0 L75 200 L225 200 Z.

错误:

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
Run Code Online (Sandbox Code Playgroud)

Aug*_*ger 4

这与这个问题相关:D3 Integration with Angular: "Error: Invalid value for <rect> attribute x"

这个问题: https: //github.com/angular/angular.js/pull/2061

对于每个<svg>属性,ng-attr-<name>={{<evaluated value>}}应使用 代替<name>={{<evaluated value>}}