As you can imagine, route and router are very closely linked but donâ€™t carry the same meaning.
While routes are responsible for setting up application state, displaying templates and loading data, a router matches the current URL to the different routes youâ€™ve defined.
When a new URL is set (the user loads the app for the first time, changes the URL manually or clicks on a link within the app), the Ember router then maps that new URL to one or more route handlers that are in turn capable of either rendering a template, loading a model that is then available to the template or redirecting to a new route.
In other words, routes are responsible for defining the data that is sent to the template, but they wouldnâ€™t function without a router.
Posted Date:- 2021-09-08 04:23:49