About virtual list

I have a code to display data, but the retrieved data cannot appear on the form (using the API)
this is my code :


and the data that appears is undefined. Please help

please help me, I am very difficult to learn framework7

В консоли есть ошибки?

apparently not, because the console has already appeared, however, the problem only lies in the display.

Посмотрите, вызывается ли success, посмотрите, что возвращает сервер.

You have numerous issues in your code:

var data = app.request.get(...)

doesn’t make any sense. Request returns XHR object, not the data. You need to access data only inside of request’s callback.

Also this:

title: i + '.' + $$('#Nama'),

doesn’t make sense too. $$('#Nama') - will return here DOM7 instance, not the string value as you probably expect here

Так он получается data еще и в callback’е и делает console.log

I’m sorry, I just learned framework7 and it turned out to be quite difficult for beginners. Previously I only used php. So can you help me solve this problem?

I’m sorry, I just learned framework7 and it turned out to be quite difficult for beginners. Previously I only used php. So can you help me solve this problem? please help me sir

logic error:

  1. dont put data ajax request in VL render/create layout,
  2. use a button to get data via ajax, then app.virtualist.appenditems(jsondata),
    just check doc from F7 website…
1 Like