Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Router = Backbone.Router.extend({
- routes: {
- '': 'catalog',
- 'store': 'catalog',
- 'store/:categoryId': 'catalog'
- },
- catalog: function() {
- var categoryProducts = new Products();
- var categoryMenu = new CategoryMenu({
- el: $("#left"), products: categoryProducts
- });
- categoryMenu.render();
- var productList = new ProductList({
- el: $("#main"), products: categoryProducts
- });
- productList.render();
- }
- });
Add Comment
Please, Sign In to add comment