Skip to content

How to make it work with nested routes? #3

Open

Description

@meliborn

I have nested routes\controller and use pagination addon. It added queryParams to route\controller with the same name(size). As I understood, in case of nesting it call all routes\controllers from child to parent. So each controller has the same queryParams. And I get the next error:
Error: Assertion Failed: You're not allowed to have more than one controller property map to the same query param key, but both companies:sizeandcompanies.company.accounts:sizemap tosize. You can fix this by mapping one of the controller properties to a different query param key via the asconfig option, e.g.size: { as: 'other-size' }`

Activity

  1. Azdaroth commented on Feb 19, 2017

    @Azdaroth
    Member

    Hi @meliborn

    Hmm, I don't think it is possible at the moment, the properties' names for query params are hardcoded. Currently one way to solve it would be to just copy the current content of mixins for controller / route and provide custom names. A PR making these properties configurable would be more than welcome :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions