If you mean you are doing it on page load, then you need to return Promise in data:
data() {
return new Promise((resolve, reject) => {
app.request({
// ...
success(data) {
// resolve promise with what will be set as data
resolve({
title: data.title,
names: data.names,
})
}
});
});
}
If you are doing it in some method then use what @tiptronic suggested
I am a new programmer and i don’t have a lot of experience but i love framework7
i fetched data in form of json from a php API using a request method
var self = this;
self.$app.request.get(‘http://localhost/ghetto/Homepage-data.php’, function (data) {
var Homepage_data = data;
console.log(Homepage_data);
});
this data returns about 100 rows from database … how can i pass this data to the page…?? for dispalying…? i am so desperate please i am asking for your help… please give me an example i can work with or learn from
i have tried promises…
template context
routing all have failed or i don’t know hoe to use them…
F7 V5.5.4 with cordova and webpack bundler…