Object
The Context object is a state variable to hold the current application state.
It extends Backbone.Model
.
The context contains various states of the current View
or Layout
.
This includes the current model and collection, as well as the current module focused.
Kind: global function
Returns: Object
- this context instance Object
Since: v0.0.1
Example
// undefined
getContext() // -> {}
// defined
// App = {
// controller: {
// context: {
// attributes: {...},
// children: {...},
// ...
// }
// ...
// }
// }
getContext() // -> returns Backbone.Model -> { attributes: {…}, children: {…}, ... }
getContext().toJSON() // -> returns Object version of the data. -> {{module: "...", layout: "...", ...}}