Case study shop-app not using hash in link

33 views
Skip to first unread message

daci...@gmail.com

unread,
Jun 10, 2016, 5:18:46 AM6/10/16
to Polymer
If I look on what is loaded in the browser dev tools, it seems that the app is not reloaded when switching from the homepage to, for example, https://shop.polymer-project.org/list/mens_outerwear . Normally you would expect to have a hash in the link somewhere to do so. I know that this case study uses app-route, but the pages explaining this element doesn' mention on how this is done...

Justin Fagnani

unread,
Jun 10, 2016, 1:23:41 PM6/10/16
to daci...@gmail.com, Polymer
Shop uses window.pushState() to change the URL: https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_pushState()_method

It's supported by all major browsers (except Opera mini): http://caniuse.com/#search=pushstate


On Fri, Jun 10, 2016 at 2:18 AM, <daci...@gmail.com> wrote:
If I look on what is loaded in the browser dev tools, it seems that the app is not reloaded when switching from the homepage to, for example, https://shop.polymer-project.org/list/mens_outerwear . Normally you would expect to have a hash in the link somewhere to do so. I know that this case study uses app-route, but the pages explaining this element doesn' mention on how this is done...

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/0e026767-d3c6-4201-bfa1-670bf94cede7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages