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