SHARE
TWEET

angular quiz

blfuentes Aug 20th, 2014 234 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @{
  2.     ViewBag.Title = "Play";
  3. }
  4.  
  5. <div id="bodyContainer" ng-app="QuizApp">
  6.     <section id="content">
  7.         <div class="container">
  8.             <div class="row">
  9.                 <div class="flip-container text-center col-md-12" ng-controller="QuizCtrl as quiz" ng-init="quiz.nextQuestion()">
  10.                     <div class="back" ng-class="{flip: quiz.answered, correct: quiz.correctAnswer, incorrect: !quiz.correctAnswer}">
  11.                     <p class="lead">{{quiz.answer()}}</p>
  12.                     <p>
  13.                         <button class="btn btn-info btn-lg next option" ng-click="quiz.nextQuestion()" ng-disabled="quiz.working">Next Question</button>
  14.                     </p>
  15.                 </div>
  16.                     <div class="front" ng-class="{flip: quiz.answered}">
  17.                         <p class="lead">{{quiz.title}}</p>
  18.                         <div class="row text-center">
  19.                             <button class="btn btn-info btn-lg option"
  20.                                    ng-repeat="option in quiz.options" ng-click="quiz.sendAnswer(option)" ng-disabled="quiz.working">
  21.                                 {{option.title}}
  22.                             </button>
  23.                         </div>
  24.                     </div>
  25.                 </div>
  26.             </div>
  27.         </div>
  28.     </section>
  29. </div>
  30.  
  31. @section scripts{
  32.     @Scripts.Render("~/Scripts/angular.js")
  33.     @Scripts.Render("~/Scripts/app/quiz-controller.js")
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top