A simple quiz component
ember install ember-quiz
{{!my-template.hbs}}
{{basic-quiz quiz=quiz canRetry=true attemptsAllowed=3 submitResults=(action="submitMyQuiz")}}
--
/* model */
quiz: {
title: 'My Quiz',
questions: [
{
id: '0',
question: 'What is 2 + 2?',
choices: ['1','3','4'],
answer: '4'
},
{
id: '1',
question: 'What is 5 x 2?',
choices: ['1','7','4','10'],
answer: '10'
}
]
}
canRetry false - Signal that retries are allowed
attemptsAllowed Infinity - Define how many retry attempts are allowed
submitResults null - Defines an action that will return a results object