Error: Invalid value for <text> attribute x="{{xForLabels.text}}" angular.js:2390 Error: Invalid value for <text> attribute x="{{xForLabels.textNumber}}" angular.js:2390 Error: Invalid value for <circle> attribute cx="{{xForLabels.circle}}" angular.js:2390 Error: Invalid value for <text> attribute x="{{xForLabels.text}}" angular.js:2390 Error: Invalid value for <text> attribute x="{{xForLabels.textNumber}}"
我在svg内部使用角度范围变量,一切都按照我的预期工作,但在控制台中我得到了这个错误.如何摆脱它们?谢谢.
解决方法@H_404_13@
我想你应该试试ng-attr-x =“{{xForLabels.text}}”
ref:https://docs.angularjs.org/guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes
ref:https://docs.angularjs.org/guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes