Rebar.View Class
Base class that extends Backbone.View and provides boilerplate plate functionality for transitioning in and out, destroying and rendering views.
Constructor
Rebar.View
()
Example:
var view = new Backbone.Rebar.View({
...
});
view.transitionIn({
...
});
view.transitionOut({
this.destroy();
},this);
Methods
destroy
()
This method is a great helper method to call when the subclass view is about to be removed. It recursively will call destroy on any subviews reference in the sub views array. It also handles removing any event listeners that may have been added to the subViews array.
render
-
callback
For instances that are used in dependency routing the render method is called and used directly after loading. For all other uses you must call render manually.
Parameters:
-
callback
Function
transitionIn
-
callback
Transitions in the view. By default this method actually does nothing.
Parameters:
-
callback
Function
transitionOut
-
callback
Transitions out the view. By default this method actually does nothing.
Parameters:
-
callback
Function
Properties
controller
Controller
Reference to the views controller
isDestroyed
Boolean
isDestroyed getter