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

Nested Route - Too many dynamic segments?

$
0
0

@hschillig wrote:

I have this in my code:

{{#link-to 'contracts.contract.info' model.id (query-params modalRedirectUrl=modalRedirectUrl) title="View More" class="plus"}}
        {{fa-icon "plus" class="small"}}
{{/link-to}}

The router.js renders it like this:

this.route('contracts', function() {
    this.route('contract', { path: '/:contract_id' }, function() {
      this.route('info');
    });
});

I have something similar with this route:

{{#link-to 'lost.contract.schedule' model.id (query-params modalRedirectUrl=modalRedirectUrl appendedQueryParams=appendedQueryParams) class='btn btn-default'}}
  {{fa-icon 'calendar'}} Schedule An Appointment
{{/link-to}}

In my router.js file:

this.route('lost.contract', { path: '/lost/contract/view/:contract_id'}, function() {
  this.route('history');
  this.route('schedule');
});

However, I keep getting this error:

Uncaught Error: More context objects were passed than there are dynamic segments for the route: lost.contract.schedule

And I have no idea why when it works fine with the other one.. does anybody have any idea why this won't work?? I'm passing the id.. that's the only "dynamic segment".. I'm not passing anymore than that..

Thank you!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles