O'Reilly logo

Ember.js Cookbook by Erik Hanchett

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

Handling dynamic segments inside routes

Using dynamic segments and dynamic models is an important aspect of routes. The following recipe will go over how this can be accomplished.

Getting ready

Before we begin our recipes, we'll need to set up a plugin called Ember CLI Mirage. Ember plugins, also known as add-ons, make it easy to share common code between applications. The Ember CLI Mirage plugin makes it easy to create a mock server so that we can develop, test, and prototype our data. We won't cover too much of this add-on in this chapter. If you'd like more information, you can download it at https://github.com/samselikoff/ember-cli-mirage.

In this example, we'll use the Ember Data's RESTAdapter, not the new JSON API adapter.

  1. In a new project, ...

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