My question might be a basic stuff in Angular.
So I have this icon :
<i class="fab fa-linkedin-in fa-lg"
(mouseenter)="animateLinkedin()"
(mouseleave)="deanimateLinkedin()">
</i>
I need to add a class to it when hovering it, so I did this :
export class SidenavComponent implements OnInit {
constructor() {
}
// Set to true on hover element
linkedInHover = false;
ngOnInit() {
}
animateLinkedin() {
this.linkedInHover = true;
}
deanimateLinkedin() {
this.linkedInHover = false;
}
}
I need to activate the class if linkedInHover is set to true, while keeping the current classes without any condition.
How can I manage doing this since seemingly I can't do this with [ngClass] ?
[EDIT] I know when to use the normal CSS :hover, as I say, that's really not my need there because I use a third party css library, so I didn't write the class I want to attach.