我已经安装了所有依赖项,并且我的代码似乎是正确的,但仍然无法指出为什么代码根本没有呈现。
提前致谢。
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bower_components/angular-chart.js/dist/angular-chart.css">
<script src="bower_components/angular-chart.js/dist/angular-chart.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body>
<div ng-app="app" ng-controller="PolarAreaCtrl">
<canvas id="polar-area" class="chart chart-polar-area"
chart-data="data" chart-labels="labels">
</canvas>
</div>
<script>
angular.module("app", ["chart.js"]).controller("PolarAreaCtrl", function ($scope) {
$scope.labels = ["Download Sales", "In-Store Sales", "Mail-Order Sales", "Tele Sales", "Corporate Sales"];
$scope.data = [300, 500, 100, 40, 120];
});
</script>
</body>
</html>