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 up the model, and redirecting and transitioning from one route to another. They can also handle actions that occur when the model changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset