Ember Octane is here! A lot has changed since Ember 3.14, including these Guides. Read more in the Ember Blog.

Old Guides - You are viewing the guides for Ember v1.12.0. VIEW v3.15.0
Edit Page

Embedding Applications

In most cases, your application's entire UI will be created by templates that are managed by the router.

But what if you have an Ember.js app that you need to embed into an existing page, or run alongside other JavaScript frameworks?

Changing the Root Element

By default, your application will render the application template and attach it to the document's body element.

You can tell the application to append the application template to a different element by specifying its rootElement property:

export default Ember.Application.extend({
  rootElement: '#app'

This property can be specified as either an element or a jQuery-compatible selector string.

Disabling URL Management

You can prevent Ember from making changes to the URL by changing the router's location to none:

var ENV = {
  locationType: 'none'
export default ENV;