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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -