Reputation: 276
I have a text in app and I want to change this text font and color when I click the button.
I did change background image "buttonclick" and .ts but this way doesn't allow change text color or font because I can't put src to <p>
so any solution?
Upvotes: 1
Views: 1942
Reputation: 2213
Maybe something like:
<p class="normalText" *ngIf="!Clicked">{{text}}</p>
<p class="changedText" *ngIf="Clicked">{{text}}</p>
Or create a text variable for the class-tag and:
<p [class]="classes">{{text}}</p>
Upvotes: 1