angular ng click toggle class

Solutions on MaxInterview for angular ng click toggle class by the best coders in the world

showing results for - "angular ng click toggle class"
Kim
28 Oct 2019
1// component.ts
2toggleClass: boolean = false;
3
4// component.html
5<button (click)="toggleClass = !toggleClass" [ngClass]="{ 'button--grey': !toggleClass }">
6  Confirm
7</button>
Claudio
16 May 2020
1$scope.toggle = false;
2
3
4<button id="btn" ng-click="toggle = !toggle" ng-class="{'red' : toggle}">Change Class</button>
queries leading to this page
toggle class on detail in angularon click on body toggle class angularangular 8 toggle class on click exampleng on click toggle classng click toggle classangular toggle div on clicktoggle class click angularng click toggle classangular toggle div class on clicktoggle classes by click method angularangular custom toggle button exampletoggle class on click button angularangular toggle classtoggle css class angularangular sample code to toggle class n clickng class toggle on clickangular inline click toggle classtoogle class clicked item angularangular onclick update classangular ng click toggle classtoggle class on click in angularangular toggle component on clickangular give a button a css class if its clickedangular 10 ng click toggle classngclick toggle classclick toggle class angularngclass toggleangular get class and then click buttonangular toggle classes on clickangular 10 toggle classes on clickangular change class on clickangular show class on clickangular on click toggle classclick event for specific css class in angular 6angular toggle class on clickusing classname with click function how to write in ts angular 6how to use toggle ng click in angular 8toggle class with button click angularangular onclick toggle classangular toggle css class on clickangular 10 toggle class onclickngclass on click button toggleangularjs toggle class on clickangular click toggle classangular 7 toggle class on clickuse ngclass use button toggle in angularangular give button a class when its clickedangular 9 toggle class on clickangular button toggle classangular on click toggleonclick on angualr item toggle classng class if clickedangular use button to toggle class on elementangular toggle on click forangular click toggle class on elementtoggle on click angularangular bootstrap toggle buttononclick toogle in angulartoggle class on click angulartoggle click function angularangular 10 toggle class on clickhow to toggle class on click on different element in angularangular toggle class onclickangular ng click toggle class