For now, app-route element use "pattern" property to match route path and
produce "data" object, that could be used for navigation. So, maybe its
better to use data binding directly in pattern? Somehow like this:
<app-location route="{{route}}"></app-location>
<app-route
route="{{route}}"
pattern="/elements/{{element}}">
</app-route>
So, I can define property "element" in my component:
properties: {
element: {
type: String,
notify: true
}
}
and use it in iron-selector or iron-pages:
<iron-selector selected="{{element}}" attr-for-selected="id">
<a id="app-route" href="/app-route">
<!-- other links-->
</iron-selector>sript
<iron-pages selected="{{element}}" attr-for-selected="id">
<element-description id="app-route">
<!-- other elements -->
</iron-pages>
And finally, upward binding for "element" property causes app-route to
change "route" object, that cause app-location to change browser location.
So, we dont need any scripted handlers :)
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/5f23fd17-9a97-4aa3-a332-967dbbfe089f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.