O'Reilly logo

Ember.js Web Development with Ember CLI by Suchit Puri

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

Making routes dynamic

Now we have successfully returned the data fetched from the server on the invocation of a route. Let's move ahead and see how can we make our routes dynamic. Till now, the URL that maps to our routes has been fixed. There may be situations in which we may want to read parts of URL and then act according to what was received. For example, we may want to make the /products/:product_id route, which shows the product page with ID equal to :product_id, or, like in our above example, we may want to create a new route /commits/:sha to display the information of a specific commit.

The above dynamism in Ember.js routes is achieved through dynamic segments. Dynamic segments in routes start with :. Let's see this by an example. We shall ...

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