Controller
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(spec: Spec) Saves the router and context to this.router and this.context, respectively. |
Member Summary
Public Members | ||
public |
context: AnimationController The AnimationController used globally in the app to change screens |
|
public |
|
|
public |
The router used globally in the app |
|
public |
spec: * |
Method Summary
Public Methods | ||
public |
onLeave(newRoute: *) Called to notify the Controller that the route is changed |
|
public |
onRouteCalled(route: Object): Boolean Called by the Router when this controller instance is being navigated to. |
Public Constructors
Public Members
public context: AnimationController source
The AnimationController used globally in the app to change screens
public spec: * source
Public Methods
public onLeave(newRoute: *) source
Called to notify the Controller that the route is changed
Params:
Name | Type | Attribute | Description |
newRoute | * |
public onRouteCalled(route: Object): Boolean source
Called by the Router when this controller instance is being navigated to. Calls the controller's method in the given route, and triggers a famous-flex AnimationController show() with the View instance that the method returns. Is also capable of receiving a Promise from the method, in which case the show() is called after the promise is resolved.
Params:
Name | Type | Attribute | Description |
route | Object | Route object generated by the Router. Contains a method name to call, and a render spec for passing to the AnimationController. |
Return:
Boolean | success Whether the controller method was fully executed, and the Router should emit a routechange event. |