you can use like this ngClass that is you need to initialize the buttonClicked in your TS file and make it initially as false
it will work
Problem :
how to make a function when I add click() in my button Validate my cells (td) of Table so put changes of color for example green cell -> green light blue light cell ->blue red cell -> dark red
This isn’t a place for asking people to code for you. Please provide something you tried yourself.
Comment posted by Mohamed h
but My td is made like that :
Comment posted by link
If you only wish to lighten or darken the color. It can be done by manipulating the Hexadecimal Values of colors.
Comment posted by Bilal Bin Zia
@Mohamedh btw, how are you implementing different colors to different cell?
Comment posted by Mohamed h
when I click on a cell there is a pop up that appears and I choose a color green red blue ect … and the box changes color my colors are CSS classes and initially all the cells of the table are green
Comment posted by Mohamed h
how to make my button recognize my function change color which is in my script
Comment posted by Mohamed h
I tried that but it changes the color of all the boxes not just the red boxes for example?
Comment posted by Sangar Lal
oaky so now you need to pass the clicked index also can you please send your full that loop code i will tell that