Confirmed users
502
edits
Line 48: | Line 48: | ||
== Modules in Settings == | == Modules in Settings == | ||
=== Define Modules === | === Define Modules === | ||
Settings modules are AMD modules. In addition to following the syntax of AMD modules, settings app also requires the returning object not | Settings modules are AMD modules. In addition to following the syntax of AMD modules, settings app also requires that the returning object must not a constructor function. Thus we can expect that all modules are able to be used without a "new" keyword. The other advantage is that the returning functions can be seen as factory methods. A factory method can return different type of objects based on the parameters, which is useful in certain use cases. | ||
=== Configure Requirejs === | === Configure Requirejs === |