Ember Inspector 4-Routes
Published on Mar 01, 2015
Let's explore the Routes tab in Ember Inspector and see everything it lets us do.
I've tried some new techniques this week to make the video more compact and information-dense. Let me know what you think.
Hey, and welcome back to Ember Sparkcasts. Today, we’re going to be talking about the Routes tab in the Ember Inspector.
The first thing you’ll notice is that there are a lot of routes. That’s because not only does it show every route and resource in your router.map, it also shows the loading, error, and index routes for each of your resources.
So here we can see every single route in our application, as well as a wealth of information. We have the Route Name, which is useful for when you’re trying to figure out arguments for things like link-to helpers and calls to transitionTo.
Next we have the Route and Controller objects, which we can access in the object explorer by clicking on the name, and in the console by clicking on the $E. Unlike in the View Tree, here we can access Controller objects which are not involved in the current route, and therefore check on different types of information. However, we can only access controllers which have a Route. If you need to access a service controller, you need to go to the container and click on ‘controllers’.
Next we have the template name, which can be useful for when you’re figuring out naming conventions and need to check which template it’s trying to use.
Finally, we have the url, which is similarly useful for when you’re figuring out naming conventions.
If we wanted to narrow it down to our current route, we can click the Current Route Only button up here, and it will take us to our current place in the route hierarchy. This button is useful for when you want to quickly find information about your current route and its parent routes without scrolling through lots of extraneous information.
That’s it for the routes tab. Thank you for watching.
I was trying some new techniques for today’s screencast, so let me know what you think by twitter or email. It took a little bit more time to do it this way, but I hope that the end result is worth it. Finally, if you enjoyed this screencast, sign up for the mailing list. That way you’ll never miss an episode. Happy Coding!