angular - how to include a external js file in Angular2 -
i new angular2. need add google map library in 1 page , in page fusion chart library. 1 thing can add in index.html pages show. want add libraries in particular pages. how add libraries in particular page partials?
in terminal window, locate project directory, package.json
placed. run following command install fusion-charts:
npm install angular2-fusioncharts --save-dev
to include in app, add following in appmodule
:
// import angular2-fusioncharts import { fusionchartsmodule } 'angular2-fusioncharts'; // import fusioncharts library import * fusioncharts 'fusioncharts';
now can use fusion-charts throughout app. dont have add link in index.html
. can same using google-maps (getting started guide).
here link angular2-fusioncharts github repository.
Comments
Post a Comment