Class M.Controller
Extends
M.Object.
The root class for every controller.
Controllers, respectively their properties, are observables. Views can observe them.
Defined in: controller.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Makes the controller's properties observable.
|
|
The type of this object.
|
Method Attributes | Method Name and Description |
---|---|
Helper function to build the location href for the view to be displayed.
|
|
set(key, value)
Returns the class property behind the given key and informs its observers.
|
|
switchToPage(page, transition, isBack, changeLoc)
Returns the class property behind the given key and informs its observers.
|
Field Detail
observable
Makes the controller's properties observable.
{String}
type
The type of this object.
Method Detail
buildLocationHref(id)
Helper function to build the location href for the view to be displayed.
- Parameters:
- {String} id
- The id of the new target.
set(key, value)
Returns the class property behind the given key and informs its observers.
- Parameters:
- {String} key
- The key of the property to be changed.
- {Object|String} value
- The value to be set.
switchToPage(page, transition, isBack, changeLoc)
Returns the class property behind the given key and informs its observers.
- Parameters:
- {Object} page
- The page to be displayed.
- {String} transition
- The transition that should be used. Default: horizontal slide
- {Boolean} isBack
- YES will cause a reverse-direction transition. Default: NO
- {Boolean} changeLoc
- Update the browser history. Default: YES