- EmberJS - Ember Inspector
- EmberJS - Configuring Ember.js
- EmberJS - Application Concerns
- EmberJS - Managing Dependencies
- EmberJS - Models
- EmberJS - Components
- EmberJS - Templates
- EmberJS - Router
- EmberJS - Object Model
- Creating and Running Application
- EmberJS - Core Concepts
- EmberJS - Installation
- EmberJS - Overview
- EmberJS - Home
EmberJS Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
EmberJS - Router
Router is a core feature of EmberJs which translates an URL into a series of templates and represents the state of an apppcation.The Ember uses the router to map the URL to a route handler. The router matches the current URL to other routes which are used for loading data, displaying the templates and to set up an apppcation state.
Route handler performs some actions such as −
It provides the template.
It defines the model and it will be accessible to the template.
If there is no permission for user to visit the particular part of an app, then router will redirect to a new route.
The following table psts down the different routers in Ember.js along with their description −
S.No. | Types & Description |
---|---|
1 | The router matches the current URL with routes responsible for displaying template, loading data and setting up an apppcation state. |
2 | To specify a routes model, you need a template to display the data from the model. |
3 | The routes are used to render the external template to the screen. |
4 | It is a URL redirection mechanism that redirects the user to a different page when the requested URL is not found. |
5 | The transition.abort() and transition.retry() methods can be used to abort and retry the transition respectively during a route transition. |
6 | Ember router provides information of a route loading and errors which occur when loading a route. |
7 | Query parameters come into view at the right side of the “?” mark in a URL represented as optional key-value pairs. |
8 | Ember.js router has the abipty to handle complex async logic within an apppcation by using asynchronous routing. |