<div ng-repeat="paper in questionPaper" class="margin_buttom_10px"
ng-init="response.take[paper.f]=1">
<div class="row"><label class="label
answer_label">Q{{$index+1}}.</label>{{paper.question}}</div>
<div class="row answwer_row answwer_row">
<div class="row ">
<div class="col-lg-10 ">
<div class="col-lg-6"><label class=" label
label-success col-lg-1" for="Q{{$index}}1"
ng-click="addClass()">A</label>{{paper.a}}<input type="radio"
name="Q{{$index}}" value="{{paper.a}}" ng-model="response.take[paper.f]"
id="Q{{$index}}1" class="hidden1" ></div>
<div class="col-lg-6"><label class="label
label-success col-lg-1" ng-click="addClass()"
for="Q{{$index}}2">B</label>{{paper.b}}<input type="radio"
name="Q{{$index}}" value="{{paper.b}}" ng-model="response.take[paper.f]"
id="Q{{$index}}2" class="hidden1" ></div>
</div>
</div>
<div class="row">
<div class="col-lg-10">
<div class="col-lg-6"><label class="label
label-success col-lg-1" for="Q{{$index}}3"
ng-click="addClass()">C</label>{{paper.c}}<input type="radio"
name="Q{{$index}}" value="{{paper.c}}" ng-model="response.take[paper.f]"
id="Q{{$index}}3" class="hidden1" ></div>
<div class="col-lg-6"><label class="label
label-success col-lg-1" for="Q{{$index}}4"
ng-click="addClass()">D</label>{{paper.d}}<input type="radio"
name="Q{{$index}}" value="{{paper.d}}" ng-model="response.take[paper.f]"
id="Q{{$index}}4" class="hidden1" ></div>
</div>
</div>
</div>
</div>
For each question there are 4 option. So when a option is clicked a class
is added . When a option is clicked on the same question , previous class
removed and class added to current option. But for that i need to access
each child scope of ng-repeat. That is each scope for each question. How to
do it?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.