What do you mean by "is not helping"? Have you checked if the class is
added in the DOM?
On Thursday, March 10, 2016 at 9:00:28 AM UTC+1, Rully wrote:
>
> I am using a bootstrap table and trying to change the background color of
> the row that I click. Trying to do this with ngClass based on active on
> inactive states is not helping.
>
> Here's the code where I try to bind inside template :
>
> <tr *ngFor="#data of mySoCalledData" (click)="myClickedRowData()"
> [ngClass]="{'active': isActive}">
>
> <td></td>
>
> .
>
> .
>
> *</tr>*
>
>
> Here I pass the value of isActive inside class:
>
>
> myClickedRowData(){
>
> isActive = true;
>
> }
>
>
> And the CSS is:
>
> .active {
>
> background-color: red;
>
> }
>
>
> How do I make the background color change so it looks selected?
>
>
>
--
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.