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 ...