Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

selectedParams property not set up in more-route-selector #72

Open
cheonhyangzhang opened this issue Sep 15, 2015 · 8 comments · May be fixed by #73 or #74
Open

selectedParams property not set up in more-route-selector #72

cheonhyangzhang opened this issue Sep 15, 2015 · 8 comments · May be fixed by #73 or #74

Comments

@cheonhyangzhang
Copy link

After digging into the more-route html files. I found that selectedParams property which is defined both in more-route-selector and more-route-selection, has the correct value in more-route-selection but not in more-route-selector.

In more-route-selector, I am trying to console.log selectedParams at the end of _onMoreRouteChange function. It's undefined. Plus when I am referencing selectedParams in html, it's undefined as well. I don't see anywhere in the more-route-selector.html assign value to more-route-selector's selectedParams.

@cheonhyangzhang
Copy link
Author

I tried insert this line into _onMoreRouteChange function of more-route-selector

this._setSelectedParams(event.detail.newRoute.params);

it worked so that in html I could get the params I need, but this is producing an error in the console

Uncaught TypeError: Cannot convert object to primitive value

@ranjeet-choudhary
Copy link

@cheonhyangzhang did u find any fix?

@cheonhyangzhang
Copy link
Author

@ranjeet-choudhary yep I think I could do a fix for this. Do u suggest that I do a pull request on this?

@cheonhyangzhang
Copy link
Author

@ranjeet-choudhary BTW I have posted several issues on this repo but haven't got replied by the owner. I guess for now nobody is maintaining this repo. And if you look at the structure of this repo, it's not in the standard format structure of Polymer 1.0. It belongs to PolymerLabs not Polymer, so I guess it might not be suggested way handling routes in future of Polymer.

@ranjeet-choudhary
Copy link

ya even i feel the same, i asked the same question here https://www.youtube.com/watch?v=D7ZSMw_qm8Q
lets wait for the answer

@cheonhyangzhang
Copy link
Author

In the meanwhile, we could use a "native" way to do the routing, using js
instead of custom routing elements or even come up with our own routing
elements : )

On Tue, Oct 6, 2015 at 11:57 AM, ranjeet-choudhary <notifications@github.com

wrote:

ya even i feel the same, i asked the same question here
https://www.youtube.com/watch?v=D7ZSMw_qm8Q
lets wait for the answer


Reply to this email directly or view it on GitHub
#72 (comment)
.

Best Wishes
Tianxiang Zhang

@ranjeet-choudhary
Copy link

tried page.js as in polymer-starter-kit. It worked for normal routing but had issues while implementing nested routing

@colintoal
Copy link

Also - it doesn't fire the more-route-selected event that the comment claims it will. :( I think there is more to this fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants