I been trying to change a class if a tab in a repeat, depending in the title of the tab. snippet shown below
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" ng-class="{{tab.title}} === 'Logs' ? 'pull-right' : ''" active="tab.active">
<div class="col-md-12">
<div ng-include="tab.content">
</div>
</div>
</tab>
But it's not working. I tried changing the tab.title to $index.
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" ng-class="{{$index}} === 1 ? 'pull-right' : ''">
<div class="col-md-12">
<div ng-include="tab.content">
</div>
</div>
</tab>
try with and without surrounding it with {} and {{}}. but still. nothing works.
Can anyone tell me what i'm doing wrong here?
as always, thanks for your time.
----EDIT---------
well i found a post where there was a workaround. don't know what happen. but it works. snippet shown below
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" class="{{ tab.title == 'Logs' ? 'pull-right':'' }} ">
<div class=" col-md-12">
<div ng-include="tab.content">
</div>
tab? Is it your own directive?ng-classtotabdirective (among others from that package). Check this issue for details - and possible workaround, involving using a custom function.class(native attribute) is supplied with an Angular expression. ) You can post this as an answer, but I'd suggest changing your question a bit - it's actuallyangular.ui/bootstrapspecific.