Posted By

heathbo on 03/19/19


Tagged

css javascript Angular


Versions (?)

Angular: Change CSS based on variable


 / Published in: JavaScript
 

This allows you to change an html element's style based on a variable.

  1. <span [ngStyle]="{'visibility': isReportSaved ? 'visible' : 'hidden'}">Saved</span>

Report this snippet  

You need to login to post a comment.