diff --git a/web/src/app/js/app.js b/web/src/app/js/app.js index bf001c7..3edc7ca 100644 --- a/web/src/app/js/app.js +++ b/web/src/app/js/app.js @@ -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([ diff --git a/web/src/app/js/pages/quiz.js b/web/src/app/js/pages/quiz.js index 58906ca..7a49caa 100644 --- a/web/src/app/js/pages/quiz.js +++ b/web/src/app/js/pages/quiz.js @@ -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]}`,