Comments (5)
The problem appears to be related to tail
, which is not nulled-out or emptied out when it no longer corresponds to the current global path.
from app-route.
Ah yes, this: https://github.com/PolymerElements/carbon-route/blob/master/carbon-route.html#L176-L177
To clear or not to clear: that is the question.
from app-route.
P.S. I believe that this is the cause of the state leak that I referred to here. I suspect it goes like this: the objects are not cleared, so the queryParams
changes - due to late-firing events from the YouTube element - bounce back up the tree via tail
and cause the query string to go from empty to populated unexpectedly.
from app-route.
Interesting. I think this makes for a pretty good argument that the default behavior should be nulling out properties when a route no longer matches, and the case where you want to keep some information alive in an element should be the special case.
Making active work wouldn't be too hard I suspect, the tricky bit would be blocking queryParams in inactive routes while maintaining their state. I think you'd have to copy the queryParams object, which seems complex and inefficient.
from app-route.
the default behavior should be nulling out properties when a route no longer matches
I think this makes a lot of sense for the first release. Maintaining state in inactive trees has a lot of subtle side-effects, especially when those trees may affect that state asynchronously.
I think you'd have to copy the queryParams object, which seems complex and inefficient
I agree, also you need to manually propagate changes (when appropriate) if you take this approach.
from app-route.
Related Issues (20)
- Observer set on `routeData` keeps firing in the background after navigating to a different page/element. HOT 3
- Changing data.page doesn't update history HOT 5
- Probleme with app-route conprehension HOT 1
- Exception Cannot create property '__queryParams' on string '}' when using 2 app-route with pattern that don't matching HOT 1
- Property "data" doesn't change when the route isn't active HOT 4
- Suggestion: Deprecate in favor of a library like Platinum Service Worker HOT 4
- app-location.html, app-router-converter-behavior.html, app-route-converter.html etc files are missing after bower install HOT 5
- queryParams blank when using client-side navigation
- Any way to override iron-location's dwellTime? HOT 3
- P1 bug: Missing import on"3.0.0-pre.6" app-route HOT 2
- Url can't change
- Correcting bad syntax context in hashes vs paths section HOT 1
- gcnfkg,j
- Error when using `auto-activate` when routing from activated path to rootPath HOT 1
- Running into an import problem with Polymer 3 HOT 16
- Error when using use-hash-as-path
- Outdated docs links
- Links to Online Docs and Demos missing
- Question - App Route with Sub Paging.
- `route-changed` fired twice with bad state HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-route.