Anchor tag data-route attribute?

45 views
Skip to first unread message

Forumer

unread,
Apr 20, 2016, 2:14:50 PM4/20/16
to Polymer
Being a beginner to Polymer, I'm trying to understand syntax. I see the following in polymer-starter-kit:

         <a data-route="home" href="{{baseUrl}}">
            <iron-icon icon="home"></iron-icon>
            <span>Home</span>
          </a>

where can I find documentation for anchor tag with "data-route" attribute? Is this Anchor tag as extended by Polymer?

Thanks

Karl Tiedt

unread,
Apr 20, 2016, 2:16:14 PM4/20/16
to Forumer, Polymer
Your snippet is incomplete, if you look at the entire file you will see a selector of some sort, iron-pages, paper-menu etc... that has attr-for-selected="data-route"

data attributes are just an HTML5 feature that is being leveraged here...

-Karl Tiedt

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/0af4facf-ee3b-4de6-8947-eb3005fb51b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Forumer

unread,
Apr 20, 2016, 2:58:27 PM4/20/16
to Polymer
Thank you!

Jim Trainor

unread,
Apr 21, 2016, 3:50:17 PM4/21/16
to Polymer
See: https://developer.mozilla.org/en/docs/Web/Guide/HTML/Using_data_attributes

Also, in the web starter kit also look at app/elements/routing.html and see how page.js is being used to perform routing. It should be clearer.

Follow Polymer on Google+: plus.google.com/107187849809354688692
Reply all
Reply to author
Forward
0 new messages