Skip to content

kumarandena/nativescript-quiz-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nativescript-quiz-demo

mock ups

Link to playground - https://play.nativescript.org/?template=play-ng&id=LhwHnA

gif

How it works

The demo uses the list of categories and questions in app/core/questions.json to populate the quiz data on the app and application-settings to store last quiz score and last quiz date.

Categories and Questions

List of Categories and Questions can be found in app/core/questions.json

You can use this list to add, remove, or edit the list of categories and questions following the format:

{
        "title": "PROGRAMMING", "quizDate": "20 October", "lastScore": "70%", "backgroundColor": "#250046", "image": "~/images/programming.png",
        "questions": [
        { "question": "Programming question 1", "options": ["one", "two", "three", "four"], "correctAnswerIndex": 0 },
        { "question": "Programming question 2", "options": ["one", "two", "three", "four"], "correctAnswerIndex": 0 },
        { "question": "Programming question 3", "options": ["one", "two", "three", "four"], "correctAnswerIndex": 0 },
        { "question": "Programming question 4", "options": ["one", "two", "three", "four"], "correctAnswerIndex": 0 },
        { "question": "Programming question 5", "options": ["one", "two", "three", "four"], "correctAnswerIndex": 0 }
    ]
}
  • title: category title displayed on the home page

  • quizDate: leave empty (the value will be stored in app settings after first attempt)

  • lastScore: leave empty (the value will be stored in app settings after first attempt)

  • color: color of all the text in the card

  • backgroundColor: background color of the card

  • image: an absolute path to the image to be displayed on the card (leave empty if no image)

  • questions: list of questions for the category

  • question: question to be displayed

  • options: list of options for the question

  • correctAnswerIndex: index of the correct option (0 - 3)

About

Play the quiz with list of categories & questions and even get last quiz score and last quiz date.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 72.7%
  • HTML 20.8%
  • CSS 6.5%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy