Chartjs-How to inject “Chart.js” to my module?

0👍

You are missing reference for angular.js

add the reference for angular.js above

  <script type="text/javascript" href="/node_modules/angular-chart.js/dist/angular-chart.min.js"></script>
    <script type="text/javascript" href="/node_modules/chart.js/dist/Chart.min.js"></script>

0👍

The order of your scripts matter. If you look at the Installation section on angular-chart.js, you will see the following order:

<script src="node_modules/chart.js/Chart.min.js"></script>
<script src="node_modules/angular-chart.js/dist/angular-chart.min.js"></script>

Chart.js should come before angular-chart.js

Moreover, you also need angular.js script inserted before those two.

Leave a comment