ember-quiz

0.0.2 • Public • Published

Ember-quiz

A simple quiz component

Installation

ember install ember-quiz

Usage

{{!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'
	}
  ]
}

Configuration

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

Demo

http://crodriguez1a.github.io/ember-quiz/

Readme

Keywords

Package Sidebar

Install

npm i ember-quiz

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • crodriguez1a