title: Using EmberJS in Grails project with a layout
body: <p>I'm trying to use Ember in my grails project. However, I'm having a layout issue. The ember templates are always displaying below the footer. This does not happen with regular html, when I don't use Ember. </p>
  
  <p>Here is my layout</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
     &lt;g:layoutHead/&gt;
     &lt;r:require module="application"/&gt;
   &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="wrap"&gt;
      &lt;g:layoutBody/&gt;
      &lt;div id="push"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="footer&gt;
    &lt;/div&gt;
    &lt;/r:layoutResources/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the page where I'm using ember template</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;meta name="layout" content="main"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;script type="text/x-handlebars"&gt;
       &lt;h1&gt;test&lt;/h1&gt;
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my applicationresources.groovy</p>
  
  <pre><code>modules = {
      application {
          dependsOn "jquery", "emberjs","emberjsdata"
          resource url:'js/application.js'
          resource url:'js/App.js'
      }
  
      emberjs {
          dependsOn 'jquery,handlebars'
          resource url: 'js/ember-latest-stable.js'
      }
      handlebars {
          resource url: 'js/handlebars-1.0.0-rc.4.js'
      }
      emberjsdata{
          dependsOn 'emberjs'
          resource url: 'js/ember-data-latest.js'
      }
   }
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>For some reason the <code>hello</code> shows up below the footer. Not sure why since it works fine with plain html</p>