O'Reilly logo

Better Backbone Applications with MarionetteJS by Joseph Zimmerman, Smashing Magazine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16: The Quiz Creator

In this chapter we’ll move on to our second module: the quiz creator. In this module, we’ll give the user the ability to construct a quiz by choosing the categories of questions they want to appear on their quiz.

Just like the previous two modules, we’ll start with the index.js main module file. Be sure to create a QuizCreator folder in the modules folder and stick index.js in there. Interestingly, we can copy and paste the code from the index.js file for the QuizList module and just change any reference of QuizList to QuizCreator:

js/modules/QuizCreator/index.js

QuizEngine.module('QuizCreator', function(QuizCreator) {
    // QuizCreator Module Must be Manually Started
    QuizCreator.startWithParent = false;

    // Router needs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required