title: Getting "NoTemplateError: Could not find template" with backbone.marionette
body: <p>In this coffeescript+backbone.marionette application I am trying to write, I am getting a "NoTemplateError: Could not find template: '#second-template' when I try to display a different view in my content region.</p>
  
  <p>Here are the two pieces of code, which are based on <a href="http://davidsulc.com/blog/2012/05/06/tutorial-a-full-backbone-marionette-application-part-1/" rel="nofollow">David Sulc's Backbone Books tutorial</a>.  The WelcomeApp displays fine but when I click the menu item that then calls MyApp.SecondApp.display(), I get the NoTemplateError.</p>
  
  <pre><code>window.MyApp = MyApp = new Backbone.Marionette.Application()
  
  MyApp.addRegions
    menu: '#menu'
    content: '#content'
  
  class MyApp.MenuView extends Backbone.Marionette.View
    el: '#menu'
  
    events:
      'click #get-second': 'showSecond'
  
    showSecond: -&gt;
      MyApp.SecondApp.display()
  
  MyApp.vent.on 'welcome:rendered', -&gt;
    menu = new MyApp.MenuView()
    MyApp.menu.attachView(menu)
  
  
  MyApp.WelcomeApp = do -&gt;
    WelcomeApp = {}
  
    class WelcomeLayout extends Backbone.Marionette.Layout
      template: '#content_welcome-template'
  
    WelcomeApp.display = -&gt;
      WelcomeApp.layout = new WelcomeLayout()
  
      WelcomeApp.layout.on 'show', -&gt;
        MyApp.vent.trigger 'welcome:rendered'
  
      MyApp.content.show MyApp.WelcomeApp.layout
  
    return WelcomeApp
  
  
  MyApp.SecondApp = {}
  
  class MyApp.SecondApp.WelcomeView extends Backbone.Marionette.ItemView
    template: '#second-template'
  
  MyApp.SecondApp.display = -&gt;
    welcomeView = new MyApp.SecondApp.WelcomeView()
    MyApp.content.show welcomeView
  
  MyApp.addInitializer -&gt;
    MyApp.WelcomeApp.display()
  </code></pre>
  
  <p>My templates are simply script blocks in the index.html.  I actually swapped the template used by the WelcomeApp with that used by the SecondApp and the WelcomeApp can find '#second-template' fine when I do this.</p>
  
  <p>I tried this with both backbone.marionette 0.9.10 and 0.9.11.</p>
  
  <p>Any help here would be greatly appreciated!</p>