Permalink
Browse files

add an initializer

  • Loading branch information...
1 parent 24d7bc2 commit aeb1cd5c5ad56f87e5dc63623e8e31b8bf73443f @davidsulc committed Apr 13, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 assets/javascripts/application.js
@@ -27,3 +27,10 @@ AngryCatsView = Backbone.Marionette.CompositeView.extend({
collectionView.$("tbody").append(itemView.el);
}
});
+
+MyApp.addInitializer(function(options){
+ var angryCatsView = new AngryCatsView({
+ collection: options.cats
+ });
+ MyApp.mainRegion.show(angryCatsView);
+});

0 comments on commit aeb1cd5

Please sign in to comment.