1

I am new to Angular2. I need to add Google map library in one page and in another page fusion chart library. One thing I can do is to add all those in index.html where my all the pages will show. But I want to add libraries in particular pages. How to add libraries in particular page partials?

1 Answer 1

2

In your terminal window, locate to your project directory, where package.json is placed. Then run the following command to install fusion-charts:

npm install angular2-fusioncharts --save-dev

To include that in a your app, add the following in your AppModule:

// Import angular2-fusioncharts
import { FusionChartsModule } from 'angular2-fusioncharts';

// Import FusionCharts library
import * as FusionCharts from 'fusioncharts';

Now you can use fusion-charts throughout your app. You dont have to add any link in your index.html. You can do the same for using google-maps (getting started guide).

Here is a link to angular2-fusioncharts github repository.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.