Created
March 21, 2013 18:36
-
-
Save vadimdemedes/5215510 to your computer and use it in GitHub Desktop.
Using templates, getting from a DOM element
This file contains 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
<script class="my-template" type="application/x-template"> | |
<div class="example"> | |
<h1>I am a view</h1> | |
</div> | |
</script> |
This file contains 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
var MyView = Chute.View.extend({ | |
template: 'script.my-template' | |
}); | |
var view = new MyView({ container: 'div.some-view' }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment