I am trying to set the hover property states using [ngStyle]
.
The following only sets the normal state colors. When I mouse over the button, the button does not change to the pressed colors as expected.
<button (click)="logout()"
class="btn register-button"
[ngStyle]=" hover ?
{'color': theme.logoutButtonColorPressed,
'border-color': theme.logoutButtonBorderColorPressed,
'background-color': theme.logoutButtonBackgroundColorPressed}:
{'color': theme.logoutButtonColorNormal,
'border-color': theme.logoutButtonBorderColorNormal,
'background-color': theme.logoutButtonBackgroundColorNormal}">
Logout
</button>
hover
here[ngStyle]=" hover {
? – Cheka<button (mouseover)="hover=true" (mouseleave)="hover=false"
... – Cheka