How to include external javascript libraries?

1
What is the best way to include different javascript libraries?
asked
1 answers
0

Hi Harish,

This depends on the library and your intended use.

The best way would be to build a custom widget where you include the javascript library and only use it within the scope of the widget. (a known issue is that minified version ov the libraries cause issues with the widget bundling so make sure to include the full library version) For more info on how to make custom widgets check out - 

https://docs.mendix.com/howto50/creating-a-basic-hello-world-custom-widget

Alternatively you can include your javascript file in the tehem/index.html file. This is a regular html file so you can include it here like you would normaly doThis will make it available in your whole application.

-Andrej

answered