You must get the Ember primary outlet correctly.

I move part of the application to Ember as the first part, hopefully transferring the full version of the application. This is an app for rails, and I'm at the conceptual stage. In my rails view (index2.html.erb), I have the following:

<script type="text/x-handlebars">
  <div>
    here is outlet:
    {{outlet}}
  </div>
</script>
within index2

However, this displays the Ember output at the bottom of the html page as follows:

enter image description here

How can i fix this? Even if I put my Ember edition in my Rails layout, it will do the same.

thanks for any help

+3
source share
1 answer

When declaring your ember application, provide a link to the div as such:

App = Ember.Application.create({
  rootElement: '#app'
});

And then create a div with this identifier in the place where your application should appear:

<div id="app"></div>

div.

+2

All Articles