Skip to content
Browse files

revert basic.html

  • Loading branch information...
1 parent 1c24c21 commit 3bd09bb06495738d93fd5ceded64488ba7b10355 @tbranyen committed
Showing with 7 additions and 9 deletions.
  1. +7 −9 examples/basic.html
View
16 examples/basic.html
@@ -30,16 +30,18 @@
<script>
// Create a Content view to be used with the Layout below.
var Content = Backbone.LayoutView.extend({
- template: "#content",
-
- initialize: function() {
- this.render();
- }
+ template: "#content"
});
// Create a new Layout with a sub view for content.
var main = new Backbone.Layout({
template: "#main",
+
+ // This will place the contents of the Content View into the main
+ // Layout's <p></p>.
+ views: {
+ "p": new Content()
+ }
});
// Attach the Layout to the main container.
@@ -47,10 +49,6 @@
// Render the Layout
main.render();
-
- // This will place the contents of the Content View into the main
- // Layout's <p></p>.
- main.setView("p", new Content());
</script>
</body>
</html>

0 comments on commit 3bd09bb

Please sign in to comment.
Something went wrong with that request. Please try again.