【发布时间】:2016-08-30 16:52:05
【问题描述】:
我正在开发一个测验软件,我想在其中显示每个问题的数字指针。我怀疑如何在不同的问题状态下为指针显示不同的类以及在其上显示一系列数字。
我已经编写了两个场景
ng-class="{
'ibps-answered': question.selected !== null,
'ibps-not-answered': question.selected === null
}",
ng-click="quiz.setActiveQuestion($index)"">1
问题的四种不同状态如下
`class="ibps-not-visited"`:questions at initial stage without touching "`default`"
`class="ibps-not-answered"`:questions visited but options are not attempted
`class="ibps-review"`:"have a special button for marking it for review in future without answering it."
class="ibps-answered":"Have attempted the questions"
class="ibps-review-answered":"have attempted and also marked for review"
第一个条件将是默认情况。我怎样才能达到其他四个条件。请给我一些建议。
【问题讨论】:
-
分享你的完整代码!!
-
我期待一个逻辑arvind,我不知道当这些事件发生时该对象会发生什么。而且这些都是表单的常见条件情况
标签: javascript angularjs frontend ng-class