k-infinitescroll
v0.6.29
Published
Kantele infinite scroll component
Downloads
50
Readme
k-infinitescroll
npm i k-infinitescroll --save
##Usage
app.component require 'k-infinitescroll'
app.get '/posts', (page, model, params, next) ->
postsQuery = model.query 'posts', { $limit: 10 }
model.subscribe postsQuery, (err) ->
return next err if err
postsQuery.ref '_page.posts'
<view name="k-infinitescroll" element="list-of-posts" datapath="_page.items" subscribedidlist="_page.k-fetch-ids" step="10"></view>
<ul id="list-of-posts">
{{each _page.posts as #post}}
<li>{{#post.text}}</li>
{{/}}
</ul>