Include third-party angular modules.

How do I include another Angular module in my NGClient solution. I can put the files in Media, but they don’t execute. How do I include / reference them like a normal angular app?

Also, how do I include a non-angular third-party javascript library like Underscore.js. Again, I put it in Media, but it isn’t included in the solution.

Thanks.

Hi,

Why do you want to include a third party library ? are you creating a Servoy Web component around an angular directive from a third party library ?
In this case you would include the library from the .spec file of the web component itself. Place the libraries in the same folder of your custom web component (resouces/components/yourComponentPackage/yourComponent)
See in the wiki an example of the specification file: https://wiki.servoy.com/display/DOCS/Specification
The property

"libraries": [{"name":"accordionpanel", "version":"1", "url":"servoydefault/tabpanel/accordionpanel.css", "mimetype":"text/css"}]

make sure that the css accordionpanel is loaded on the browser togheter with the custom web component.

If you would like to use the same library for a whole package of custom component you would like to declare load only once the library instead of doing for each component in package. In this scenario you can reference to the library from the manifest file.
An example of the such Manifest file in Servoy 8.0.1:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_05-b06 (Oracle Corporation)
CSS-ClientLibs: css/bootstrap/css/bootstrap.css;name=bootstrap;version=3.3.1
Absolute-Layout: True
Bundle-Name: Servoy Default
Bundle-SymbolicName: servoydefault

Name: button/button.spec
Web-Component: True
...

for underscore.js which is i think just a lib with all kind of usefull functions (not directly tied to a component)
you could make a service (instead of a component) that service can then have a 3th party lib (just as paolo described above)

then that lib will always be included, so you don’t really need a component for that.