Infinity-scrollingEmberJS


(Jeisy) #1

hello community, I am new, I am tulizando Emberjs, I have a question using infinity scrolling, I followed the basic steps of the page https://www.npmjs.com/package/ember-infinity
but I think something is wrong, I can not visualize the scrolling function … someone who can help me. Thank you.

import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

export default Route.extend({

    infinity: service(),

    model() {
        return this.infinity.model('chat', { perPage: 5, startingPage: 1 });
        }
            

});
-----------------------------------------------------------------------------------------------

{{#each model as |chat|}}
      


        <div class="chatContactos hero" >
            <div class="w3-cell" style="width:30%;">
                <img src="media/in9.jpg" alt="Avatar" class="w3-circleChat">
            </div>
            <div class="w3-cell w3-container" style="width:100%;">
                <h4 style="margin-bottom: 2px">{{mensajes.sender}}</h4>
                <p>{{mensajes.message}}</p>
            </div>
            <span style="margin-left: 63%; margin-top: -10%">
                {{mensajes.hora}}</span>
                
        </div>
        {{/each}} 
{{infinity-loader infinityModel=model hideOnInfinity=true
  loadingText="Loading..."
  loadedText="Loaded!" eventDebounce=50 triggerOffset=offset }}

----------------------------------------------------------------------------------------------