Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-75553

Let aliases for module names be specified in script tag

    Details

      Description

      Given a script JSP tag with a require field, extend its syntax so that the javascript variable name can be overridden. With that syntax we could write, for example, something like:

       

      <aui:script require="my-module@1.0.0 as main">
        main.default();
      </aui:script>
      

       

      Where `my-module@1.0.0 as main` generates a `main` variable to reference the module, instead of the older (automatically generated) `myModule100`.

      Steps to test:

      1. Start Portal
      2. Deploy attached JAR file
      3. Add a "npm-portlet-a Portlet" to the Welcome page
      4. Assert that it works and displays "Hello World!" inside the portlet box

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.0.0 DXP FP37
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                7.1.X
                Master