Last active
August 29, 2015 14:01
-
-
Save bendrucker/2ec5416fb042ce9d17d3 to your computer and use it in GitHub Desktop.
Forms — ng-forms all the way down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Most Abstract --> | |
<quiz quiz="quiz"></quiz> | |
<!-- 2 --> | |
<form class="quiz"> | |
<h1>{{quiz.title}}</h1> | |
<question-set questions="quiz.questions"></question-set> | |
</form> | |
<!-- 3 --> | |
<form class="quiz"> | |
<h1>{{quiz.title}}</h1> | |
<ng-form class="questions" ng-repeat="question in quiz.questions"> | |
<question text="question.text" answers="question.answers"></question> | |
</ng-form> | |
</form> | |
<!-- 4 --> | |
<form class="quiz"> | |
<h1>{{quiz.title}}</h1> | |
<ng-form class="questions" ng-repeat="question in quiz.questions"> | |
<ng-form class="question"> | |
<input class="question-text" ng-model="question.text"></input> | |
<answer-set answers="question.answers"></answer-set> | |
</ng-form> | |
</ng-form> | |
</form> | |
<!-- "" --> | |
<form class="quiz"> | |
<h1>{{quiz.title}}</h1> | |
<ng-form class="questions" ng-repeat="question in quiz.questions"> | |
<ng-form class="question"> | |
<input class="question-text" type="text" ng-model="question.text" /> | |
<ng-form ng-repeat="answer in question.answers"> | |
<answer text="answer.text" correct="answer.correct"></answer> | |
</ng-form> | |
</ng-form> | |
</ng-form> | |
</form> | |
<!-- 6 --> | |
<form class="quiz"> | |
<h1>{{quiz.title}}</h1> | |
<ng-form class="questions" ng-repeat="question in quiz.questions"> | |
<ng-form class="question"> | |
<input class="question-text" type="text" ng-model="question.text" /> | |
<ng-form ng-repeat="answer in question.answers"> | |
<ng-form class="answer"> | |
<input class="answer-text" type="text" ng-model="answer.text"> | |
<input type="checkbox" class="answer-correct" ng-model="answer.correct" /> | |
</ng-form> | |
</ng-form> | |
</ng-form> | |
</ng-form> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment