Newer
Older
realomat / index.html
<!doctype html>
<html ng-app="tutorialApp">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
        <title>Real-o-Mat</title>
    </head>
    <body>
        <div class="container" ng-controller="mainCtrl">
            <h1>Ergebnis</h1>
            <div ng-show="answered">
                <h5>Bei {{ answered }} von {{ unansweredQuestions.length }} Fragen</h5>
                <ul class="list-group">
                    <li class="list-group-item" ng-repeat="(attr, value) in result">{{ attr }}: {{ value }}</li>
                </ul>
            </div>
            <div ng-hide="answered">
                <p>Noch keine Fragen beantwortet.</p>
            </div>
            <div ng-repeat="question in unansweredQuestions">
                <h4>{{ question }}</h4>
                <div class="radio">
                    <input type="radio" id="yes_{{$index}}" name="question_{{$index}}" value="yes" ng-model="answer[$index]" ng-change="updateAnswer($index)" />
                    <label for="yes_{{$index}}">Ja</label>
                </div>
                <div class="radio">
                    <input type="radio" id="no_{{$index}}" name="question_{{$index}}" value="no" ng-model="answer[$index]" ng-change="updateAnswer($index)" />
                    <label for="no_{{$index}}">Nein</label>
                </div>
                <div class="radio">
                    <input type="radio" id="abst_{{$index}}" name="question_{{$index}}" value="abst" ng-model="answer[$index]" ng-change="updateAnswer($index)" />
                    <label for="abst_{{$index}}">Egal</label>
                </div>
            </div>
        </div>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
        <script src="app.js"></script>
        <script src="controllers/mainCtrl.js"></script>
    </body>
</html>