July 2016
Intermediate to advanced
274 pages
6h 11m
English
Asynchronous Module Definition (AMD) format for creating modules in JavaScript, is targeted for use in browsers. This format proposes a particular way for defining modules so that modules and their dependencies can be loaded into the browser asynchronously.
There are two key methods that you need to use when creating and consuming AMD modules, these are define and require methods.
The idea is that we create a module using the global define method and then we can import that module in other parts of the code (other modules) using the global require method.
Here is how a module can be defined in AMD format:
define('moduleOneId', ['dependency'], function(dependency) { return ...Read now
Unlock full access