Last active
January 21, 2020 13:26
-
-
Save bipon68/821317680348aaafc2ff2d253188459b to your computer and use it in GitHub Desktop.
Angular ngStyle and ngClass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ngStyle]="{'text-align':col.field=='ItemId'?'right':col.field=='AccessionNo'?'right':col.field=='Qty'?'right':col.field=='Rate'?'right':'left'}" | |
#ngStyle multiple property | |
[ngStyle]="{'width': col.header=='Waiting Time'?'80px':col.header=='Arrival Time'? '200px':col.header=='Status'?'120px':'', 'text-align': col.header=='Arrival Time'?'right':'left'}" | |
#ngClass | |
[ngClass]="expanded ? 'fa fa-fw fa-chevron-circle-down' : 'fa fa-fw fa-chevron-circle-right'" | |
## | |
# ternary | |
class="{{flipPatientImaging === false ? 'flip-active-btn' : 'flip-normal-btn'}}" | |
let flipItem = (<HTMLElement>document.querySelector('.bottom-flip-content')).offsetHeight; | |
document.getElementById('common-flip-all-tab').style.height = flipItem + 50 + 'px'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment