4👍
✅
If you closely look at error, it does clearly said that
ReferenceError: Chart is not defined angular-chart.js:13:5 Error:
[$injector:modulerr]
Basically angular-chart.js
doesn’t work stand alone API. It is just wrapper directive to make it compatible very easily with AngularJS code. If you look at angular-chart.js code, you will come to know that it uses Chart
object, which is come from chart.js
API.
To fix you problem you need to add chart.js reference before angular-chart.js
as, Chart
object will available render chart.
So do add chart.js cdn reference
reference before angular-chart.js
to make your code working.
I’d also prefer you to go through the angular-chart.js Getting started Doc
Source:stackexchange.com