Skip to content

Instantly share code, notes, and snippets.

@joewest
Created October 7, 2011 21:06
Show Gist options
  • Save joewest/1271351 to your computer and use it in GitHub Desktop.
Save joewest/1271351 to your computer and use it in GitHub Desktop.
// 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({
});
<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