Created
May 14, 2011 21:09
-
-
Save superchris/972638 to your computer and use it in GitHub Desktop.
A FooView that creates his BarView during render and reuses it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FooView extends Backbone.View | |
| "#button click": "displayBarView" | |
| render: -> | |
| # Do the normal rendering | |
| @barView = new BarView(el: @$("#bar_view")) | |
| displayBarView: -> | |
| @barView.display() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment