我正在使用angularjs练习响应式SVG
我尝试使用ng-repeat绘制一个矩形条形图,但只显示了一个,其他人不断出现错误。
以下是我的尝试:


Angular Chartsvar dashboard = angular.module("Dashboard", []);
dashboard.controller("BarGraphController", function($scope) {
$scope.specs = {
height: 30,
bars: [{
color: '#2a9fbc',
width: 50
}, {
color: '#f15b2a',
width: 70
}, {
color: '#a62e5c',
width: 100
}]
};
});
x="0" y="0" fill="{{bar.color}}" width="{{bar.width}}" height="{{specs.height}}"/>



这是我在浏览器中不断获取的内容:
意外值{{specs.height}}解析高度属性。的index.html
意外值{{bar.width}}解析宽度属性。的index.html
解析高度属性的意外值{{specs.height}}。 angular.min.js:70:379
意外值{{bar.width}}解析宽度属性。 angular.min.js:70:379
解析高度属性的意外值{{specs.height}}。 angular.min.js:70:379
意外值{{bar.width}}解析宽度属性。 angular.min.js:70:379
解析高度属性的意外值{{specs.height}}。 angular.min.js:70:379
意外值{{bar.width}}解析宽度属性。