I am using Polymer iron-pages along with paper-tabs in my rails application. The problem is that not one of the pages was shown until one of the paper-tabs clicked. I want the first page in iron-pages be selected by default without user interaction.
I set both paper-tabs and iron-pages to <template is='dom-bind'></template> . Read the data binding documentation, but I could not figure out how to achieve this. Please offer your valuable suggestions. Thanks.
<template is="dom-bind"> <div class="middle"> <paper-tabs class="bottom self-end" selected="{{selected}}"> <paper-tab>Page 1</paper-tab> <paper-tab>Page 2</paper-tab> </paper-tabs> </div> <div class="bottom"> <iron-pages selected="{{selected}}"> <div> Page 1(This should be selected by default.) </div> <div> Page 2 </div> </iron-pages> </div> </template>
bhanu source share