Skip to content

Commit

Permalink
add villain item view (with template)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Oct 22, 2013
1 parent 6f8c8db commit 7d864d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assets/javascripts/application.js
Expand Up @@ -10,6 +10,11 @@ Heroes = Backbone.Collection.extend({
model: Hero
});

VillainView = Backbone.Marionette.ItemView.extend({
template: "#villain-template",
tagName: "li"
});

HeroView = Backbone.Marionette.CompositeView.extend({
template: "#accordion-group-template",

Expand Down
4 changes: 4 additions & 0 deletions index.html
Expand Up @@ -18,6 +18,10 @@
<body>
<div id="content">
</div>

<script type="text/template" id="villain-template">
<%= name %>
</script>

<script type="text/template" id="accordion-group-template">
<div class="accordion-heading">
Expand Down

0 comments on commit 7d864d8

Please sign in to comment.