I am building a Polymer3 music app, which fetches playlists from public api. All the playlistNames are implemented as routerLinks.
On clicking, the playlistName
is getting bold, but on page reload the routerLink is not highlighted(bold).
For example: If i am entering localhost:8081/playlist1
in URL, then playlist1 should be bold, on page reload.
Thanks in advance.
static get template() {
return html `
<app-location route="{{route}}" url-space-regex="^[[rootPath]]">
</app-location>
<app-route route="{{route}}" pattern="[[rootPath]]:page" data="{{routeData}}" tail="{{subroute}}">
</app-route>
<app-drawer-layout fullbleed="" narrow="{{narrow}}">
<!-- Drawer content -->
<app-drawer id="drawer" slot="drawer" swipe-open="[[narrow]]">
<app-toolbar>Menu</app-toolbar>
<iron-selector selected="[[page]]" attr-for-selected="name" class="drawer-list" role="navigation">
<template is="dom-repeat" items="[[playlists]]">
<a name="[[item.name]]" href="[[rootPath]][[item.name ]]">[[item.name]]</a>
</template>
</iron-selector>
</app-drawer>
`;
}