Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Nested routes but non-nested templates

$
0
0

@johnunclesam wrote:

First of all, thank you all for your efforts in this forum.

I have this situation:

  • mysite.com/authors (list of authors)
  • mysite.com/author/1 (author 1)
  • mysite.com/book/1 (book 1 of author 1)
  • mysite.com/cart/1 (cart page of book 1 of author 1)

I need an url like this:

mysite.com/author/1/1/cart

but I don't want nested template (every page is different and I don't want same info in many page).

Is there a way to have that URL?

My actual router.js is this:

Router.map(function() {
  this.route('index', {path: '/'});
  this.route('login');
  this.route('authors', {path: '/authors'});
  this.route('author', {path: '/author/:author_id'});
  this.route('book', {path: '/book/:book_id'});
  this.route('cart', {path: '/cart/:cart_id'});
});

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles