// From PHP
Extending The Universal library
make a .js file in templates/js and put these codes:
now you can call js like this:
If you are including some 3rd party code, they sometimes might not like dynamic loading. Third party code might assume that the on-ready is not yet triggered or do some other kind of magic. Google Maps code, for example, wants to be loaded along with your page.
If this happens, you can specifically instruct Agile Toolkit to put the include inside the HTML.
You must be mindful to include this on the page, which is loaded directly, and can potentially open other pages through AJAX, requiring this include. If unsure, add this code to your API’s init() method.
If you want to go even more ‘hardcore’ with the include you can do this:
Executing any JS code
// SAFE: $my_message is escaped