Components on pages load from router


  1. For example i create app use this template

  2. And I insert
    into “ABOUT PAGE”

  3. How I can DELEGATE
    $$(’.infinite-scroll-content’).on(‘infinite’, function () {
    // Exit, if loading in progress

Because wherever I put that code, it doesn’t work.

(Except the main page - index.html)

Check how it is done in Vue Kitchen Sink

Ok, it i am understend, but how to delegate

I dynamically create elements (add new html code to page). Create it in cycle in my code into methods: {…

For Example this:
<a href="#" class=“button button-raised button-fill” @click=“loadMore”>Добавить

And @click=“loadMore” not work. (((

I can put to loadMore function to GLOBAL and get from this scope

But I want past code on page where i use it (not ibdex)


If you add such elements dynamically it won’t work, because it is parsed on page init

it is very difficult to use in this case. I delegate Events int ROUTES.js
pageInit: function (e, page) {

But from this code, functions in the pages are not visible. From routes file not vosible scope in pages file

An easy way to call functions on dynamically added elements?

Pages have this code

return {
data: function () {
return {
allowInfinite: true,
lastItem: 1,
methods: {

How can add some code to delegate elements dynamically added?

Infinite add new elements but event on it dont work