Currently in a project utilizing Angular 4, I have implemented two components: app.component and other.component
Within app.component.html, there exists a div with the name attribute myClass.
<div class="myClass"></div>
In the other.component.ts
file, the following initialization is present:
ngOnInit() {
jQuery('.myClass').removeClass();
jQuery('.myClass').addClass('someClassName');
}
Seeking to find an alternative approach using Angular rather than relying on jQuery.
This prompts the question... How can this same functionality be achieved in Angular 2+?