I want to add class depending on a flag and the screen resolution I tried
[ngClass]="singleFloorFlagStyle ? 'floorPlanContainerWidth' : 'singleFloor'"
@media only screen and (min-width: 1500){
.floorPlanContainerWidth{
width: 670px;
}
}
@media only screen and (max-width: 1400){
.floorPlanContainerWidth{
width: 613px !important;
}
}
.singleFloor{
width: 1300px;
}
singleFloorFlagStyle I would receive as true or false. So singleFloor class gets applied but floorPlanContainerWidth class doesn't.How can I make the media query classes work.
I had referred this Angular 5: Use ngClass to switch classes for mobile and desktop views but I guess my scenario is different