I am currently experiencing an issue with ng-class. When I click, I pass a variable and then check if it is true in ng-class. If it is indeed true, I append the "col-xs-6" class.
Here is what I have attempted:
<div ng-class="{'col-xs-6': myVar}">
<div class="panel panel-default panel-height" ng-repeat="candidateInfo in aCandidateDetails track by $index">
<div class="panel-heading header-background">>
<div stop-watch time="xyz" name="candidateInfo.name" time-of-interview="candidateInfo.doi" class="stop-watch"></div>
<div class="row">
<div class="col-xs-2">><a style="cursor:pointer" class="pull-right">>{{candidateInfo.name}}</a></div>>
<div class="col-xs-offset-9">><a style="cursor:pointer" ng-click="myVar" data-toggle="collapse" data-target="{{'#'+toggle}}">{{candidateInfo.name}} resume</a></div><
</div><
</div><
</div><
<div id="{{toggle}}" class="collapse" ng-class="{'col-xs-6': myVar}">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Unfortunately, this approach is not working as expected.
I am unsure where I might be making a mistake.
I even tried it on Plunker here: demo
Any guidance or assistance you can provide would be greatly appreciated.