I am new to angular and build two component in my first angular app. In first component i put a click on button to navigate to second component.
I m using below code for navigation :
this.router.navigate(['../secondcomponent/'], { relativeTo: this.route });
but i can see that second component is having css of component 1. How can i make sure that on each router navigation previous component css will removed and only that component as well as the index.html css should be present?