Created
October 7, 2011 21:06
-
-
Save joewest/1271351 to your computer and use it in GitHub Desktop.
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
// snip | |
App.View = SC.View.extend({ | |
templateName: 'main' | |
}); | |
App.subView1 = SC.View.extend({ | |
mouseUp: function(event) { | |
console.log('Clicked back.'); | |
} | |
}); | |
App.subView2 = SC.View.extend({ | |
templateName: 'sub_view2' | |
}); | |
App.subView3 = SC.View.extend({ | |
}); |
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
<head> | |
<!-- snip --> | |
<script type="text/x-handlebars" data-template-name="main"> | |
<div id="page"> | |
<div class="main"> | |
<div class="nav"> | |
{{#view App.subView1 }} | |
<span>Back</span> | |
{{/view}} | |
</div> | |
{{view App.subView2 }} | |
{{view App.subView3 }} | |
</div> | |
</div> | |
</script> | |
<script type="text/x-handlebars" data-template-name="sub_view2"> | |
<div class="subview"> | |
<p>subView2</p> | |
</div> | |
</script> | |
<!-- snip --> | |
</head> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment