Reputation: 562
Ember makes use of the router.js to load a resource and its corresponding template into the application template. But what happens when a particular route is accessed? i.e How will ember get to know that we are accessing a route but not a resource?
Upvotes: 0
Views: 28
Reputation:
Google this question, you'll find lots of answers. Or, read the source code.
Basically, resource
simply resets the directory path so Ember looks for the relevant assets at the top level of the project. If you have an "authenticated" route which checks authentication, and under that you have a "users" route, you'll likely want to make that a resource so you can keep "user" related assets such as controller, route and template in a user directory at the top level instead of under an "authenticated" directory.
Upvotes: 1