I'd like to build something similar to Google search, where at the top there are different filters (text search, filter by time...). At the bottom user can have different views, so web search, image search, video search...
I imagine that the bottom views will be different ember controllers. Here is a sample jsFiddle. I have two controllers, a web and an image, both getting data from Navigation controller.
My Navigation controller
App.NavigationController = Ember.ObjectController.extend({
search: ''
});
Other controllers would get the information and act on it.
App.SearchController = Ember.ObjectController.extend({
needs: ['navigation'],
updateResults: function () {
return this.get('controllers.navigation.search');
}.property('controllers.navigation.search')
});
I'd like to put those filters into querystring, so the url can be passed around. How can I achieve something like:
http://myApp/#/web?find=someText&date=lastMonth
http://myApp/#/image?find=otherText&date=lastYear
Can this be done in ember?