Bigous / ng2-highcharts

Angular2 library to use Highcharts out of the box
59 stars 23 forks source link

(404) ng2-highchart not found using angular cli #31

Closed devrockzz closed 8 years ago

devrockzz commented 8 years ago

GET http://localhost:4800/node_modules/ng2-highcharts/ng2-highcharts.js 404 (Not Found) what is the steps to add ng2 highcharts in angular2-CLI or to integrate it ? please give a clear documentation how to integrate it with angular cli step wise

meiqi2014 commented 8 years ago

I think for the latest version (0.3.5), the import path in your code needs to be updated from import { Ng2Highcharts } from 'ng2-highcharts/ng2-highcharts'; to import { Ng2Highcharts } from 'ng2-highcharts';

Bigous commented 8 years ago

Hi, angular-cli is not supporting it yet. See angular/angular-cli#1717 . If you need to use it with the webpack version, put in your main file

window['Highcharts'] = require('highcharts');

add the highcharts and ng2-highcharts to your dependencies and run with ng serve... I've wrote a simple example here to show it working, but again, angular-cli is not ready to go with external libraries. []'s