npm install ng2-charts --save
2. Installed chart js
npm install chart.js --save
3. Added cdn link to the index.html
<link href= "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js">
4.Performed following to add 3rd party library to the project:
a) In System-config.ts file added following:
const map: any = {
'ng2-charts': 'vendor/ng2-charts'
};
const packages: any = {
"ng2-charts": { main: 'ng2-charts.js' }
};
b) in the 'angular-cli-build.js' added following:
ng2-charts/**/*.js'
5. Then in the 'app.module.ts' file :
a) When I use the following the import the project:
import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts';
it displays an error that there is no exported member 'CHART_DIRECTIVES'
b) so I replaced 'CHART_ DIRECTIVES' with 'ChartsModule' and it works fine till now.
Here is where I'm stuck:
When I see my project in the browser, I get the following error:
"zone.js:101 GET http://localhost:4200/node_modules/ng2-charts/ng2-charts.js 404 (Not Found)"
Please refer screenshot for the complete list of errors that I get.
Can any please help me out with this.. Thanks.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.