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 doesn't preserve query-string on reload

fooloomanzoo opened this issue · comments

The query-attribute of the internal iron-location gets overwritten on initial load

I think I'm running into this issue as well. When I put a URL into the browser with query parameters and hit return, the query parameters disappear. I am using a static file server that rewrites to my index.html file (SPA support), if that makes any difference.

Possible duplicate: #192

Looks like there's a PR to fix this: PolymerElements/iron-location#83

The Problem lies at the paramsObj in iron-query-params.html. The paramsObj is initialy an empty Object and gets initially parsed and reflected to the window.location.search String. A solution could be that the paramsObj is null in the beginning so that the observer is not called.

Observing the same issue when packing the web app with Cordova: Cordova's cdvToken gets stripped from the URL, thereby preventing device images to be shown in the Cordova app.

I'm running into this bug as well.

Still encountering this problem, even on version 2.0.2

edit:
adding: ready: function () { console.log(this._queryParams); } or
ready: function () { console.log(this.$$('app-route').queryParams); }

_queryParams will have the correct values at this stage in the code.
This might be useful...

stills an issue

same problem here

@e111077 do you mean #86 is a duplicate, and fixing that would fix this issue? Right now I'm confused as to the state of #194: It's closed by #86, but that one is still open without much activity.

Nice catch. I meant to link to another repo. Comment fixed