DEV Community

André
André

Posted on

Angular Single Class Binding

For today, I learned that there is a thing called "Class Binding" in Angular that allows me to have CSS override the existing Styling based on conditions.

<div class="normal" [class.fullscreen]="isFullscreen">...</div>
Enter fullscreen mode Exit fullscreen mode

My usecase is that a clicked div gets a different styling to highlight a selection!

Top comments (0)