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

Creating your first route

Till now most of our examples in our previous chapters have been using the index or / route. Real-world web applications seldom have only one route. Ambitious web applications, on the other hand, have a separate URL endpoint mapped to each different state of the application.

The Ember.js framework provides the concept of a router, a route, and a resource to manage the mapping between the URL and the state of the application.

Router in Ember.js is the core and the central part of the framework. It maintains the mapping of the URLs to individual routes. It monitors the URL of the web application and then, based on the mapping, it invokes the individual routes.

Let's see how to add this mapping. We will be adding two new routes, ...

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