I've been pouring over the docs for Ember and while they are well done, they seem to be lacking from a cookbook persective of bringing all the pieces together. If I have a list of items that can be added to my cart, I am trying to build a page that lists the items (this is done and working) but I want a sidebar that shows all the items in my cart.
I have the following routes:
export default Router.map(function() {
this.route('index');
this.route('items');
this.route('cart');
});
export default Ember.Route.extend({
model() {
return this.store.find('item');
}
});
export default Ember.Route.extend({
model() {
return this.store.find('cart');
}
});
Now, I'm at a loss as to how to show both my items and my cart on a single template; in essence, calling 2 routes for a single template/
Aucun commentaire:
Enregistrer un commentaire