What will render faster?
one
or
another
o
Solution 1:
I did some research and can surely say that this approach
<divclass="ololo" [ngClass]="{'my-class': myVar}">one</div>
works about 3 times slower than
<divclass="ololo {{myVar ? 'my-class': ''}}">another</div>
please see a demo
https://stackblitz.com/edit/angular-fvtzck
Post a Comment for "Angular 2. What Is Faster To Render: [ngclass] Or Class="{{}}"?"