這是我的HTML。我給這樣的如何注入「chart.js之」我的模塊?
<html>
<head>
<script src="../../Content/Scripts/Script/angular.min.js"></script>
<script src="../../Content/Scripts/Script/Chart.js"></script>
<script src="../../Content/Scripts/Script/angular-charts.min.js"></script>
<script src="../../Content/Scripts/Script/ui-bootstrap-tpls.js"> </script>
<script src="../../Content/Scripts/Controllers/graphController.js"></script>
</head>
<body>
<div ng-app="app" ng-controller="financeAnalyticsController" class="support-section">
{{a}}
</div>
</body>
</html>
路徑在我的劇本我當我用我的應用程序是給錯誤寫
var app = angular.module("app", [ "chart.js","ui.bootstrap", "ui.bootstrap.typeahead",]);
app.controller('financeAnalyticsController', function ($scope, $http, $filter) {
$scope.a="testing";
});
Uncaught Error: [$injector:modulerr]
如何解決這個錯誤?
注射器錯誤似乎與你的問題無關。你不必注入另一個'chart.js'。你的代碼看起來很好,你能建立一個普朗克嗎? – johan
如果您正在使用chartjs LIB它不是一個angularjs模塊。 – JEY