Scroll 滚动目标=";文件「;从自定义元素中选择“铁卷轴阈值”
我想在文档滚动位置接近底部时使用iron scroll threshold触发嵌套自定义元素的方法 因此,我在index.html文件中有一个Scroll 滚动目标=";文件「;从自定义元素中选择“铁卷轴阈值”,scroll,polymer,polymer-starter-kit,Scroll,Polymer,Polymer Starter Kit,我想在文档滚动位置接近底部时使用iron scroll threshold触发嵌套自定义元素的方法 因此,我在index.html文件中有一个 <link rel="import" href="/src/my-app.html"> <body> <my-app></my-app> </body> </html> <iron-pages selected="[[page]]"
<link rel="import" href="/src/my-app.html">
<body>
<my-app></my-app>
</body>
</html>
<iron-pages
selected="[[page]]"
attr-for-selected="name"
fallback-selection="view404"
role="main">
<my-questions name="questions"></my-questions>
<my-view404 name="view404"></my-view404>
</iron-pages>
现在,加载页面时_loadMoreQuestions方法会触发一次,但不会再次触发。当文档从底部滚动400px时,如何使此方法触发
<ul id="question-list">
<template is="dom-repeat" items="[[questions]]" sort="_computeSort" as="question">
<poll-result questionkey="[[question.$key]]"></poll-result>
</template>
</ul>
<iron-scroll-threshold on-lower-threshold="_loadMoreQuestions" lower-threshold="400" id="threshold" lower-triggered="{{nearBottom}}" scroll-target="document">
</iron-scroll-threshold>
_loadMoreQuestions: function(){
console.log('load more questions fired');
var questionCount = this.$.questionQuery.limitToLast;
this.$.questionQuery.limitToLast = questionCount + 10;
var threshold=this.$.threshold;
threshold.clearTriggers();
},