angular onclick toggle class

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

showing results for - "angular onclick toggle class"
Juan Martín
18 Apr 2016
1// component.ts
2toggleClass: boolean = false;
3
4// component.html
5<button (click)="toggleClass = !toggleClass" [ngClass]="{ 'button--grey': !toggleClass }">
6  Confirm
7</button>
Mira
20 Aug 2017
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
ngclass on click button toggleng on click toggle classangular 8 toggle class on click exampletoggle class click angularhow to use toggle ng click in angular 8angular on click toggleangular click toggle classclick toggle class angularngclass toggleangular give a button a css class if its clickedangular custom toggle button exampletoggle class with button click angularhow to toggle class on click on different element in angulartoogle class clicked item angularangularjs toggle class on clicktoggle css class angularangular toggle div class on clickangular get class and then click buttontoggle class on detail in angularangular change class on clickusing classname with click function how to write in ts angular 6angular 10 ng click toggle classonclick on angualr item toggle classangular toggle class onclicktoggle on click angularangular 10 toggle class onclickangular bootstrap toggle buttonng click toggle classangular 9 toggle class on clickangular toggle div on clickangular use button to toggle class on elementangular button toggle classtoggle class on click in angularon click on body toggle class angularangular 10 toggle classes on clickangular inline click toggle classtoggle class on click button angularngclick toggle classng class toggle on clickangular toggle on click forangular 10 toggle class on clicktoggle class on click angularng click toggle classangular show class on clickangular toggle component on clickangular give button a class when its clickedclick event for specific css class in angular 6angular ng click toggle classangular toggle class on clickangular onclick toggle classtoggle click function angularangular toggle classangular onclick update classuse ngclass use button toggle in angularng class if clickedangular on click toggle classangular 7 toggle class on clicktoggle classes by click method angularangular toggle classes on clickangular toggle css class on clickangular onclick toggle class