...

/

Setting up Routes

Setting up Routes

In this lesson, you will learn how to use and set up routes in an Ember application.

Ember gives a lot of power to routes, and wielding that power is one of the most important things to learn to be an efficient Ember developer. Routes can do wonderful things for you, if you know how to talk to them.

What do we want to achieve?

To introduce routes, let’s start with something simple. When the user navigates to /bands in the Ember application, we want to show the list of bands, fetched from the backend (even if that back-end is, for the time being, living in memory). The same goes for songs. We want them to be displayed in a list when the URL is /songs. Finally, we want to be able to navigate between bands and songs by clicking links.

Setting up routing data

The first step is to define the routes that will serve as the backbone of the application. In fact, one could get a decent, high-level overview of the application by looking at the routing table. This can serve as a starting point to further explore the ...

Route

Access this course and 1200+ top-rated courses and projects.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy