Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8537839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:59:42+00:00 2026-06-11T10:59:42+00:00

I have a nested route structure that allows for pagination / sorting / searching

  • 0

I have a nested route structure that allows for pagination / sorting / searching that will essentially tweak the ArrayController in some way. The problem I have with the current implementation is that everything is required to get a valid page to render.

http://localhost:8000/#/page/1/sort/username/search/dave

If I only pass the page I get the error

Uncaught Error: assertion failed: Could not find state for path

Am I missing something in the nested routes or do I need to mark sort/search as optional some how?

PersonApp.Router = Ember.Router.create({
  root: Ember.Route.extend({
    index: Ember.Route.extend({
      route: '/',
      connectOutlets: function(router) {
        router.get('applicationController').connectOutlet('person', router.get('store').findAll(PersonApp.Person));
      },
      paginated: Ember.Route.extend({
        route: '/page',
        index: Ember.Route.extend({
          route: '/:page_id',
          connectOutlets: function(router, context) {
            console.log("here with page id " + context.page_id);
            router.get('personController').set('selectedPage', context.page_id);
          },
          exit: function(router) {
            router.get('personController').set('selectedPage', undefined);
          },
          sorted: Ember.Route.extend({
            route: '/sort',
            index: Ember.Route.extend({
              route: '/:column',
              connectOutlets: function(router, context) {
                console.log("SORTING " + context.column);
              },
              search: Ember.Route.extend({
                route: '/search',
                index: Ember.Route.extend({
                  route: '/:term',
                  connectOutlets: function(router, context) {
                    console.log("SEARCHING " + context.term);
                  }
                })
              })
            })
          })
        })
      })
    })
  })
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:59:43+00:00Added an answer on June 11, 2026 at 10:59 am

    Emberjs Router allows routing to only leaf nodes, So You have to make your each node leaf node by adding dummy ‘/’ route in each route. Following question is similar to yours you can look at those.
    Why does Ember Router only allow navigating to leaf routes?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nested route: resources :period_registrations do member do post :save_period end that
I have a nested route like so: resources :apps do resources :issues end the
I have a nested javascript object called data. Is there any way to iterate
I have a constrained route that matches usernames like this: controller :users, :path =>
I have a resourceful route, with a post route nested within it: resources :groups,
I have a nested route as: resources :wsps do member do get :location get
Ok guys so I have a nested route like this: resources :apps do resources
I need some help with nested resource actions. I have three nested resources: Jobs,
So, I have a controller nested within 2 others here's an example route products/123/conditions/321/inventories/121
I have a Rails application that has a Company resource with a nested resource

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.