mirror of
https://github.com/Raghu-Ch/TurtleFactsQuiz.git
synced 2026-02-10 03:33:01 -05:00
added logic to get quiz questions and answers
This commit is contained in:
23
index.html
23
index.html
@@ -71,7 +71,7 @@
|
||||
<div class="col-md-6">
|
||||
<p><strong>locations:</strong>{{list.activeTurtle.locations}}</p>
|
||||
<p><strong>Size:</strong>{{list.activeTurtle.size}}</p>
|
||||
<p><strong>Average: Lifespan</strong>{{list.activeTurtle.lifespan}}</p>
|
||||
<p><strong>Average Lifespan:</strong>{{list.activeTurtle.lifespan}}</p>
|
||||
<p><strong>Dite:</strong>{{list.activeTurtle.dite}}</p>
|
||||
</div>
|
||||
<div class="col-xs-12 top-buffer">
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<h2><progress:</h2>
|
||||
<h3>progress:</h3>
|
||||
<div class="btn-toolbar">
|
||||
<button class="btn"
|
||||
ng-repeat = "question in quiz.dataServices.quizQuestions"
|
||||
@@ -119,7 +119,7 @@
|
||||
<p>Unanswered</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- legend ends -->
|
||||
</div> <!-- progress section -->
|
||||
|
||||
<div class="row">
|
||||
@@ -130,19 +130,30 @@
|
||||
<h4>{{quiz.activeQuestion+1 + ". " + quiz.dataServices.quizQuestions[quiz.activeQuestion].text}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row"
|
||||
ng-if = "quiz.dataServices.quizQuestions[quiz.activeQuestion].type === 'text'" >
|
||||
<div class="col-sm-6" ng-repeat = "answer in quiz.dataServices.quizQuestions[quiz.activeQuestion].possibilities">
|
||||
<h4 class ="answer">
|
||||
{{answer.answer}}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"
|
||||
ng-if = "quiz.dataServices.quizQuestions[quiz.activeQuestion].type === 'image'">
|
||||
<div class="col-sm-6" ng-repeat = "answer in quiz.dataServices.quizQuestions[quiz.activeQuestion].possibilities">
|
||||
<div class="image-answer">
|
||||
<img ng-src="{{answer.answer}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ng-click will call the questionAnswered method on the controller -->
|
||||
<button class = "btn btn-warning" ng-click = "quiz.questionAnswered()">Continue</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- quizCtrl ends -->
|
||||
</div> <!-- container ends -->
|
||||
<!-- third party scripts -->
|
||||
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-rc.2/angular.min.js"></script> -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user