I was wondering if there is an easy way to count dom elements using Angular 2. For example having the following code:
<div *ngFor="let user of users" [ngClass]="{'special': isSpecial(user)}">
{{ user.name }}
</div>
Is there an easy way to get the total number of rows containing the special class without creating pipes or functions?
With Jquery it would be as easy as running:
$( ".special" ).length;