Contain all functions of controllers both common and specific.
- Source:
Example
// Functions for common controller if `commonController` value is "common.json".
NA.websiteController["common.json"].loadModules(...);
NA.websiteController["common.json"].setSessions(...);
NA.websiteController["common.json"].setConfigurations(...);
NA.websiteController["common.json"].setRoutes(...);
NA.websiteController["common.json"].changeVariation(...);
NA.websiteController["common.json"].changeDom(...);
// Functions for specific controller if a route `controller` value is "index.json".
NA.websiteController["index.json"].changeVariation(...);
NA.websiteController["index.json"].changeDom(...);
Methods
(static) changeDom(params, callback)
Define this function for intercept DOM and modify it with jQuery for example. Both `common` and `specific` controller.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Collection of property.
Properties
|
||||||||||||
callback |
changeDom~callback | Next steps after configuration is done. |
- Source:
(static) changeVariation(params, callback)
Define this function for intercept Variation object and modify it. Both `common` and `specific` controller.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Collection of property.
Properties
|
||||||||||||
callback |
changeVariation~callback | Next steps after configuration is done. |
- Source:
(static) loadModules()
Define this function for adding npm module into `NA.modules` of application. Only for `common` controller file.
- Source:
(static) setConfigurations(callback)
Define this function for configure all modules of your application. Only for `common` controller file.
Parameters:
Name | Type | Description |
---|---|---|
callback |
setConfigurations~callback | Next steps after configuration is done. |
- Source:
(static) setRoutes(callback)
Define this function for configure all modules of your application. Only for `common` controller file.
Parameters:
Name | Type | Description |
---|---|---|
callback |
setConfigurations~callback | Next steps after routes is done. |
- Source:
(static) setSessions(callback)
Define this function for configure sessions of application. Only for `common` controller file.
Parameters:
Name | Type | Description |
---|---|---|
callback |
setSessions~callback | Next steps after configuration is done. |
- Source: