Partial.common Class
Access point: ac.partial.* Provides methods for working with "actions" and "views" on the current Mojits.
Methods
invoke
(
-
action -
options -
cb
This method calls the current mojit's controller with the "action" given and returns its output via the callback.
The options parameter is optional and may contain:
- params
- <object> must be broken out explicitly:
- route
- <object> Map of key/value pairs.
- url
- <object> Map of key/value pairs.
- body
- <object> Map of key/value pairs.
- file
- <object> Map of key/value pairs.
Parameters:
-
actionStringname of the action to invoke.
-
optionsObjectsee above.
-
cbFunctioncallback function to be called on completion.
render
(
-
data -
view -
cb
This method renders the "data" provided into the "view" specified. The "view" must be the name of one of the files in the current Mojits "views" folder. Returns via the callback.
Parameters:
-
dataObjectThe object to be rendered.
-
viewStringThe view name to be used for rendering.
-
cbFunctioncallback signature is function(error, result).
