Using dynamic segments and dynamic models is an important aspect of routes. The following recipe will go over how this can be accomplished.
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.
In a new project, run this installation command in the
application
folder:$ ember install [email protected]
This will install version
0.1.11
of Ember CLI Mirage, Bower, andnpm
packages in the application. We'll be using this version for all the examples in the...