You code is very badly formatted so could not go through the whole code.
Simple answer:
<div ng-repeat= 'question in questions'>
<div ng-repeat='ans in question.answers' ng-click=someFn(ans)>
</div>
</div>
JS:
$scope.someFn =function(ansSelected){
// do something
};
Data:
questions{
desc: 'blah',
answers: ['opt1', 'opt2']
}
On Wednesday, November 4, 2015 at 8:14:07 AM UTC-8, Subhadeep Pal wrote:
>
> 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.