Importing a JS-Library
-
r0136 years ago #10103
Hi,
i was wondering how to import external libraries like “Crypto.js” or “Chart.js”
what do i have to do to import these libraries successfully into my simplifier instance.
Cheers!
Mathieu RollHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)6 years ago #10106::Hi,
you can Add a Javascript Lib under Applications.
There is a Tab Libraries where you can create a new Library and Upload your Library in Zip Format.
In the JS-Code input Field you need to Define wich Scripts should be Loaded.
You can add Script with the addScript(‘<library-file-name.js>’, ‘<library-name>’); function and
CSS files with addStyle(‘<library-file-name.css>’, ‘<library-name>’);After you created the Library you can use it in you Application by adding it under Libraries
But you can use it in Widgets too.
Denis Simon5 years ago #18151::Hi,
i have added a library to my application as explained above.
It mainly contains simple utilities like lodash etc.
Now i want to use some library functions in my screens/controllers.
How do i import the library namespace during runtime to call a function?
Is it possible to use an external library within a script in the process designer?
Any code i write in the code designer (IDE) in generated controllers gets deleted when the app is redeployed. Why does this happen?
I am not sure how to define a external library inside a controller.
I would really appreciate it if you could explain the recommended approach to me in a few sentences.
Thanks in advance.
Mathieu RollHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)5 years ago #18203::Hello,
i have a library named helperFunctions wich is registering a object helperFunctions in the window object.
The library is zipped and has only one js file.
Now create a new library within Simplifier Upload the Zip file and add the script wich is within the zip file.
After this you can add the Library within your application.
And now you can use the Library within a script shape in the Process Designer.
Chris BouveretHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification
You must be logged in to reply to this topic.