Skip to content

Instantly share code, notes, and snippets.

@fabdrol
Created October 7, 2014 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabdrol/898e4ac9760fc358ce81 to your computer and use it in GitHub Desktop.
Save fabdrol/898e4ac9760fc358ce81 to your computer and use it in GitHub Desktop.
View
<section class="survey-answers">
<div class="answer" ng-repeat="answer in request.survey_answers">
<div class="answer-question">
<h2>{{ answer.question }}</h2>
</div>
<div class="answer-answer" ng-switch="answer.type">
<div class="answer-label single_select" ng-switch-when="single_select">
<input type="radio" disabled checked> {{ answer.text }}
</div>
<span ng-switch-when="multiselect">
<pre>{{ answer.value | json }}</pre>
<div class="answer-label multiselect" ng-repeat="val in answer.value">
<input type="checkbox" disabled checked> {{ val }}
<!-- @FIXME -->
</div>
</span>
<span ng-switch-when="pictures">
<div class="answer-label pictures" ng-repeat="value in answer.value">
<div class="answer-image" style="background-image: url({{ value }});" ng-click="viewImage(value)"></div>
</div>
</span>
<span ng-switch-when="overview">
<div class="answer-label overview" ng-repeat="value in answer.value">
<div class="answer-image" style="background-image: url({{ value }});" ng-click="viewImage(value)"></div>
</div>
</span>
<div class="answer-label" ng-switch-default>
{{ answer.text }}
</div>
</div>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment