angularjs – svg的无效值
发布时间:2020-12-17 07:17:02 所属栏目:安全 来源:网络整理
导读:我输入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 SVG路径:M 150 0 L75 200 L225 200 Z. 错误
我输入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> 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 解决方法
这涉及到这个问题:
D3 Integration with Angular: “Error: Invalid value for <rect> attribute x”
这个问题:https://github.com/angular/angular.js/pull/2061 对于每个< svg>应使用属性,ng-attr-< name> = {{< evaluate value>}}来代替< name> = {{< evaluate value>}}. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |