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
|
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
|