I have a variable in my ts file that toggles when a button is clicked:
expanded: boolean = false;
expandStuff() {
this.expanded = !this.expanded;
}
I have a few divs that I want this toggle to affect and change the class of the div. So I thought I could use ngClass:
[ngClass]="{'max-stuff' : expanded}"
I added only this to the divs I want to be affected. But I have been unable to get it to work. Literally nothing happens. What am I doing wrong? Do I need to add something else? Is my syntax incorrect?