Prepares the controler for beeing initialized. This means it will set the correctdependencies for injection and create the component.
The component's behaviors.
The child controllers.
A flag that indicates if the controller was already compiled.
The component instance of the controller.
This flag indicates if the controller is currently running its entering animation.
This flag indicates if the controller is currently running its leaving animation.
The controller's localScope.
The keys that should be available in the local scope.
The defining element of the template.
The parent controller.
The current postion of the controller inside its parent.
The scope inside which the component was defined.
Appends the controller's element to the DOM and performs anoptional entering animation.
Runs an optional leaving animation and executes the remove method.
This method will create the local scope, compile the controller's childrenwith the correct dependencies and after that initialize the controller'sbehaviors.
Removes all bindings that were made by the controller's component or its childrenand removes the controller's element from the DOM.
Recursively destroys the controller's children.
This class is mainly working behind the scenes. Every component ina Mahalo application has its controller. The controller is responsiblefor knowing how a component relates to other components and alsofor managing its attached behaviors.
The most common use for this class is to inject the correct controllerinto a Component or a Behavior. You can then useit to traverse the tree of controllers and find relevant parents orchildren.
You can also use it to create children inside of your component on the fly.Have a look at the source of Show for a simple example of this.
{ default } from mahalo/app/component-controller