I did install the the ng2-charts and chartsjs into my angular-cli project. But I am getting the error:
VM1096:4 Uncaught ReferenceError: require is not defined
at eval (eval at webpackJsonp.54.module.exports (addScript.js:9), <anonymous>:4:38)
...
I had the same problem, just include this to your .angular-cli.json
"apps": [
{
"scripts": [
"../node_modules/chart.js/dist/Chart.min.js"
]
}
thanks, I included the wrong file.
Most helpful comment
I had the same problem, just include this to your .angular-cli.json
"apps": [ { "scripts": [ "../node_modules/chart.js/dist/Chart.min.js" ] }