Partial.common Class
Access point: ac.partial.* Provides methods for working with "actions" and "views" on the current Mojits.
Methods
invoke
-
action -
options -
propagateFailure -
params -
route -
url -
body -
file -
cb
This method calls the current mojit's controller with the "action" given and returns its output via the callback.
Parameters:
-
actionStringname of the action to invoke.
-
optionsObjecta literal object with the configuration
-
propagateFailureBooleanwhether or not errors invoke should affect the original action by calling adapter.error
-
paramsObjectoptional object to be passed as params in the invoke command. It defaults to the current action params.
-
routeObjectMap of key/value pairs.
-
urlObjectMap of key/value pairs.
-
bodyObjectMap of key/value pairs.
-
fileObjectMap of key/value pairs.
-
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).
