A JavaScript module encapsulates code into a useful unit that exports its capability/value. This makes it easier to see the broader scope, easier to find what you’re looking for, and keeps related code close together. A normal web page usually loads JavaScript files via HTML script tags. That’s fine for small websites, but when developing large scale web applications, a more robust organization and loader is needed. A module loader lets an application load dependencies easily by specifying a string that identifies the JavaScript module’s name.

These tutorials show you how to load JavaScript modules in Portal.

Loading AMD Modules in Liferay

Modularized JavaScript code is a specification for the JavaScript language called Asynchronous Module Definition, or AMD. The Liferay AMD Module Loader is the native loader that you can use to load...

Read More

Using External JavaScript Libraries

You can use external JavaScript libraries in your portlets (i.e., anything but Metal.js, jQuery, or Lodash, which are included by default). There are a few methods you can use to make external...

Read More

Loading Modules with AUI Script

The aui:script tag is a JSP tag that loads JavaScript in script tags on the page, while ensuring that certain resources are loaded before executing. Note: AUI is deprecated and no longer in active...

Read More
0 (0 Votes)
Clay CSS and Themes Previous