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 |
---|---|
set(key, value)
This method initializes the notification of all observers, that observe the property behind 'key'.
|
|
switchToPage(page, transition, isBack, updateHistory)
Switch the active page in the application.
|
|
switchToTab(tab)
Switch the active tab in the application.
|
Field Detail
observable
Makes the controller's properties observable.
{String}
type
The type of this object.
Method Detail
set(key, value)
This method initializes the notification of all observers, that observe the property behind 'key'.
- Parameters:
- {String} key
- The key of the property to be changed.
- {Object|String} value
- The value to be set.
switchToPage(page, transition, isBack, updateHistory)
Switch the active page in the application.
- Parameters:
- {Object|String} page
- The page to be displayed or its name.
- {String} transition
- The transition that should be used. Default: horizontal slide
- {Boolean} isBack
- YES will cause a reverse-direction transition. Default: NO
- {Boolean} updateHistory
- Update the browser history. Default: YES
switchToTab(tab)
Switch the active tab in the application. This includes both activating this tab
visually and switching the page.
- Parameters:
- {M.TabBarItemView} tab
- The tab to be activated.