Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 240
Open
Description
Hi there, I am working on a ListView that highlights the elements when the user taps on a specific item. I am trying to add a CSS style to make it looks like its selected but seems like its not adding the style. This is my HTML code:
<ListView #selectListView [items]="_auxSelectItems" (itemTap)="onItemTap($event)"> <ng-template let-item="item"> <Label [class]="'item item-content top-left-rounded top-right-rounded bot-left-rounded bot-right-rounded ' + (this._selectedItemsCheck[item.ID] ? 'item-selected' : '')" [text]="item.Description" textWrap="true" style="padding:10;"></Label> </ng-template> </ListView> In the onItemTap event I have this code...
onItemTap(event: ItemEventData) : void{let lb = <Label>event.view; lb.cssClasses.add("font-bold"); // also tried: lb.className = "font-bold"} The font-bold rule is defined in a css file like this:
.font-bold{font-weight: bold} Am I missing something? Thanks!