design a CSS style for when the button is hovered over
.hover-text {
color: #fff;
}
Next, in your component, create a variable to hold the text that will appear during the hover state:
hoverText = "Book Now";
then utilize the ngClass directive to implement the CSS style on the button when it is being hovered over and change the text to the specified variable
<button
type="submit"class="btn"
*ngFor="let available of availableTime; let i = index"
[ngClass]="{'hover-text': isHovered}"
(mouseover)="isHovered = true"
(mouseout)="isHovered = false"
>
{{ isHovered ? hoverText : available.value}}
</button>
whenever the mouse hovers over the button, the "hover-text" class will be activated and the text within the button will transition to the content of the "hoverText" variable