In this issue I saw a very interesting use of iron-pages:
<carbon-route route="[[route]]" patte="/groups" active="{{isAll}}">
</carbon-route>
<carbon-route route="[[route]]" patte="/groups/:groupId" active="{{isProfile}}"></carbon-route>
<carbon-route route="[[route]]" patte="/groups/:groupId/members" active="{{isMembers}}"></carbon-route>
<iron-pages attr-for-selected="key" selected="getKey(isAll, isProfile, isMember)">
<div key="all">...</div>
<div key="profile">...</div>
<div key="members">...</div>
</iron-pages>
...
/** Map the various flags for the `selected` property of iron-pages: */
getKey: function(isAll, isProfile, isMembers) {
// Workaround for issue #61: match most specific first
if (isMembers) retu 'members';
if (isProfile) retu 'profile';
if (isAll) retu 'all';
retu 'default';
}
Doing selected="getKey(isAll, isProfile, isMember)"> would be awesome! But... I haven't managed to find any doc on data binding about it.
Is this even supported?
Merc.
