PolymerElements / app-route

A modular client-side router

Home Page:https://www.polymer-project.org/1.0/articles/routing.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

app-location deletes query string parameters

antoinegoutagny opened this issue · comments

Description

app-location removes query string parameters from the location.

Expected outcome

I use an app-location tag in my component to obtain query string parameters, like this;

<app-location route="{{route}}" query-params="[[queryParams]]"></app-location>

One would expect to have a queryParams object containing query string values as key/values.

Actual outcome

The url is rewritten with the query string completely removed. queryParams object in my component is undefined.
I first noticed this when moving from polymer 2.0-rc7 to 2.0.1, and app-location from 2.0-preview to 2.0.

Live Demo

https://api-1913.s3-eu-west-1.amazonaws.com/index.html?foo=bar

Steps to reproduce

  1. Ad an app-location to your element
  2. Open the page in a web browser, add a query string, e.g. ?foo=bar
  3. See query string being removed.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Duplicate of #194 , had not seen it before.