I'm new to Ember.js and still trying to wrap my head around it.
One of things I've been trying to do lately is changing the buttons of a navigation bar depending on which route I am. My application has two levels of navigation. The first level is a bar which allows the user to navigate through the main tabs of the application, and this changes the router. Then inside each of those tabs, there is a sub-navigation bar which allows the user to navigate to more specific tabs inside the first-level tabs.
I understand how nested routing works, but I'm not sure how to implement such a navigation system. What I want to do is update the sub-navigation bar with the labels specific to the 1st level tab the user is in.
Any ideas?
Update with code for the navigation/routes:
App.Router.map(function() {
this.resource("spots", function() {
this.route("aroundYou");
this.route("search");
});
this.resource("rankings", function() {
this.route("topUsers");
this.route("topSpots");
}
});