Стилизация угловых записей на основе состояния внешнего интерфейса

Посмотрим на графическом примере, как выполняется следующий код:

import copy

class Foo(object):
    def __init__(self):
        pass


a = [Foo(), Foo()]
shallow = copy.copy(a)
deep = copy.deepcopy(a)

1
задан Muirik 25 March 2019 в 19:43
поделиться

1 ответ

You need a style binding.

<tr *ngFor="let record of records | paginate: { id: 'customers', itemsPerPage: 12, currentPage: getPageNumber() }" 
[style.font-weight]="record?.status === 'processing' ? '300' : 'bold'">
</tr>

Также вы можете попробовать * ngIf = ""

<div *ngIf="some condition"> 
   <tr *ngFor="let record of records | paginate: { id: 'customers', itemsPerPage: 12, currentPage: getPageNumber() }">
</div>

<div *ngIf="some other condition"> 
   <tr *ngFor="let record of records | paginate: { id: 'customers', itemsPerPage: 12, currentPage: getPageNumber() }">
</div>
0
ответ дан George C. 25 March 2019 в 19:43
поделиться
Другие вопросы по тегам:

Похожие вопросы: