Incorporating ngClass to add and remove classes is what I'm working on. My goal is to modify the pointer style. Here's the HTML code snippet of my component:
[ngClass]="{'zoom-cursor': cyClass}"
Within the corresponding TypeScript code for the same component, there is a boolean variable named cyClass
.
The CSS styling I've implemented is as follows:
.zoom-cursor {
cursor: url(../src/assets/img/zoom-cursor.svg), pointer!important;
}
While moving the mouse, the pointer image changes as intended. However, when the mouse is stationary, nothing alters. I desire immediate visibility of these changes. It appears that Angular may not be updating in real-time. I attempted manual triggering but found it challenging.