无法将 app-route 与 iron-selector 和 iron-pages 绑定
Cannot bind app-route with iron-selector and iron-pages
我对我的错误感到非常沮丧。 <app-route>
正在工作,但该死的 <iron-pages>
不能应用 class="iron-selected"
到任何它的 CHILD!!!
index.html
<app-location route="{{route}}" use-hash-as-path></app-location>
<app-route route="{{route}}" pattern="/:page" data="{{data}}" tail="{{tail}}"></app-route>
<iron-selector selected="[[data.page]]" attr-for-selected="name" fallback-selection="Question">
<a name="Questions" href="#/Questions">
<paper-button raised id="askbutton" onclick="submitquestion()">Ask</paper-button>
</a>
<iron-selector>
<iron-pages role="main" id="view-selector" selected="[[data.page]]" attr-for-selected="name">
<q-card id="my-database-ref-id" route="{{route}}" name="Questions">
<answer-panel name="Question" route="{{tail}}" ></answer-panel>
</iron-pages>
q-card.html
<paper-card elevation=1 class="qcardclass" id="qcard">
<div class="cui">
</div>
<div class="q">
<h1 id="q" class="q">{{QuestionData.qis}}<!--<Questioninshort-Data></Questioninshort-Data>--></h1>
</div>
<iron-selector selected="{{data.page}}"
attr-for-selected="name">
<a name="Question" href="#/Question/{{QuestionData.Key}}">
<paper-icon-button name="Question" icon="arrow-forward" align="right" class="aar" ></paper-icon-button>
</a>
</iron-selector>
</paper-card>
answer-panel.html
<!-- <app-location route="{{route}}" use-hash-as-path ></app-location> -->
<!-- <app-route route="{{route}}" pattern="/:question_id" data="{{subrouteData}}"></app-route> -->
<iron-selector selected="{{data.page}}"
attr-for-selected="name"> -->
<a name="Questions" href="#/Questions">
<paper-icon-button icon="clear" align="right" class="close" onclick="answerformclose()"></paper-icon-button>
</a>
</iron-selector>
不知道哪里出错了,如果是绑定问题或者更深层次的问题,请帮助我。
好的,我明白了。我刚刚将整个应用程序从 index.html 移动到自定义元素。
我对我的错误感到非常沮丧。 <app-route>
正在工作,但该死的 <iron-pages>
不能应用 class="iron-selected"
到任何它的 CHILD!!!
index.html
<app-location route="{{route}}" use-hash-as-path></app-location>
<app-route route="{{route}}" pattern="/:page" data="{{data}}" tail="{{tail}}"></app-route>
<iron-selector selected="[[data.page]]" attr-for-selected="name" fallback-selection="Question">
<a name="Questions" href="#/Questions">
<paper-button raised id="askbutton" onclick="submitquestion()">Ask</paper-button>
</a>
<iron-selector>
<iron-pages role="main" id="view-selector" selected="[[data.page]]" attr-for-selected="name">
<q-card id="my-database-ref-id" route="{{route}}" name="Questions">
<answer-panel name="Question" route="{{tail}}" ></answer-panel>
</iron-pages>
q-card.html
<paper-card elevation=1 class="qcardclass" id="qcard">
<div class="cui">
</div>
<div class="q">
<h1 id="q" class="q">{{QuestionData.qis}}<!--<Questioninshort-Data></Questioninshort-Data>--></h1>
</div>
<iron-selector selected="{{data.page}}"
attr-for-selected="name">
<a name="Question" href="#/Question/{{QuestionData.Key}}">
<paper-icon-button name="Question" icon="arrow-forward" align="right" class="aar" ></paper-icon-button>
</a>
</iron-selector>
</paper-card>
answer-panel.html
<!-- <app-location route="{{route}}" use-hash-as-path ></app-location> -->
<!-- <app-route route="{{route}}" pattern="/:question_id" data="{{subrouteData}}"></app-route> -->
<iron-selector selected="{{data.page}}"
attr-for-selected="name"> -->
<a name="Questions" href="#/Questions">
<paper-icon-button icon="clear" align="right" class="close" onclick="answerformclose()"></paper-icon-button>
</a>
</iron-selector>
不知道哪里出错了,如果是绑定问题或者更深层次的问题,请帮助我。
好的,我明白了。我刚刚将整个应用程序从 index.html 移动到自定义元素。