您好我正在尝试在模态弹出窗口(jquery模态)中显示角度js条形图,但它不起作用。我尝试过以下代码。
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content widg_larg">
<div class="title">Modal Title
<span class="pull-right cursor_pointer">
<i class="fa fa-times" data-dismiss="modal" aria-label="Close"></i>
</span>
<div ng-controller="testConrtoller">
<canvas class="chart chart-bar" data="data"
labels="labels" width="400" height="400"></canvas>
</div>
</div>
</div>
</div>
</div>
和js代码是
app.controller("testController", function ($scope, $http) {
$scope.labels = ["January", "February", "March", "April", "May", "June", "July"];
$scope.series = ['Series A', 'Series B'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
$scope.onClick = function (points, evt) {
console.log(points, evt);
};
});
但它无法正常使用它。