Chapter 4. Ember Router

In this chapter, we will cover the following recipes:

  • Defining an application route
  • Setting up a route model
  • Handling dynamic segments inside routes
  • Defining routes with templates
  • Using redirection with routes
  • Working with asynchronous routing
  • Loading and error handling
  • Using query parameters

Introduction

The router in Ember is responsible for changing the state of the application when a user performs an action. This can be anything from the user changing the URL to hitting the back button in the application. Regardless of what action is performed, the route handler is responsible. It takes the current URL and maps it to the correct route so that it can be displayed to the user.

Route handlers take care of rendering templates, loading ...

Get Ember.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.