Improve pages.home preloading when loading pages.quiz
This commit is contained in:
parent
2d501f7575
commit
e99f1bd636
|
@ -460,6 +460,13 @@ function scriptPageHandler(modname, cfg) {
|
|||
}
|
||||
|
||||
app.preload = {
|
||||
home: function() {
|
||||
app.script('pages.home');
|
||||
app.template.loadMany([
|
||||
'home.index',
|
||||
'home.quiz_item',
|
||||
]);
|
||||
},
|
||||
quiz: function() {
|
||||
app.script('pages.quiz');
|
||||
app.template.loadMany([
|
||||
|
|
|
@ -25,6 +25,7 @@ app.pages.quiz = {
|
|||
window.prevHash === '')
|
||||
animateTimeout('#quiz', 'slide-from-right');
|
||||
page().setDragEvent();
|
||||
app.preload.home();
|
||||
};
|
||||
if (data === undefined)
|
||||
http.get(`/api/v1/me/quizs?id=${args[1]}`,
|
||||
|
|
Loading…
Reference in New Issue