Skip to content

Possible Regression: Query params alias behavior changed? #12102

@wagenet

Description

@wagenet

In 1.13.8 I had the following code:

// controller.js
  queryParams: {
    displayMode: "mode"
  }

// route.js
  queryParams: {
    mode: {
      replace: true
    }
  }

However, this started giving an error in 2.0:

You're not allowed to have more than one controller property map to the same query param key, but both app:displayMode and app:mode map to mode. You can fix this by mapping one of the controller properties to a different query param key via the as config option, e.g. displayMode: { as: 'other-displayMode' }

Changing the route to the following solved the issue.

  queryParams: {
    displayMode: {
      replace: true
    }
  }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions