O'Reilly logo

Mastering Ember.js by Mitchel Kelonye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring the router

The router can be customized in the following ways:

  • Logging state transitions
  • Specifying the root app URL
  • Changing browser location lookup method

During development, it may be necessary to track the states into which the application transitions. Enabling these logs is as simple as:

var App = Ember.Application.create({
 LOG_TRANSITIONS: true
});

As illustrated, we enable the LOG_TRANSITIONS flag when creating the application. If an application is not served at the root of the website domain, then it may be necessary to specify the path name used, as in the following example:

App.Router.reopen({
  rootURL: '/contacts/'
});

One other modification we may need to make revolves around the techniques Ember.js uses to subscribe to the browser's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required