Skip to main content
Pentaho Documentation

IAmdLoaderPlugin

IAmdLoaderPlugin

An AMD/RequireJS loader plugin module is a module which can be used to load other, logical modules.

To use this type of module as an AMD loader plugin module, request it with an ! character appended to its module identifier. Any content after the ! character denotes the logical module name.

In the following example, the first dependency loads the the virtual module foo.bar using the my/plugin-module loader plugin module as an intermediary, while the second dependency loads the my/plugin-module itself. The latter is useful only if the loader plugin module exposes members beyond those of the loader plugin interface.

define([
  "my/plugin-module!foo.bar",
  "my/plugin-module"
], function(fooBar, pluginModule) {
  // ...
}

AMD loader plugin modules are required to contain a load method.

Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 17

See also:  http://requirejs.org/docs/plugins.html

Methods

Name Description
load(name, require, onLoad, config)

Loads a logical module given its name.

normalize(name, normalize) : string

Normalizes the name of a logical module.

Methods Details

load(name, require, onLoad, config)

Loads a logical module given its name.

Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 45

Parameters:
Name Default Value Summary
name : string

The name of the logical module to load.

require : function

The contextual require function of the dependent module, if any, or the global require function, if requested using it.

onLoad : function

Callback function to call with the resolved module, once it is resolved.

config : object

The full AMD/RequireJS config object.

normalize(name, normalize) : string

Normalizes the name of a logical module.

Converts several names that refer to the same logical module to its canonical name, to ensure that the modules are recognized as being the same and are correctly cached.

This is an optional method.

Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 59

Parameters:
Name Default Value Summary
name : string

The name of the logical module to load.

normalize : function

The default normalize function.

Returns:
Name Description
string

The normalized logical module