Skip to content

Router. createQueryParams is failing when called with array #16310

Description

@WiseBird

I'm submitting a ... (check one with "x")

[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When using query parameter with multiple values in redirectTo, e.g.:

  {
    path: '',
    redirectTo: '/list?param=true&param=false',
    pathMatch: 'full'
  }

error TypeError: v.startsWith is not a function is thrown when app tries to redirect.

Expected behavior

App should be redirected.

Minimal reproduction of the problem with instructions

Check plunker

What is the motivation / use case for changing the behavior?

This is a bug

  • Angular version: 4.0.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions