I have a question about routing in Angular. Can I navigate to a page that is within the same component or in a different directory?
For example, if we are currently in the component home
:
home
- home.component.html
- home.component.css
- home.component.ts
- classes.html
How can I redirect the user to the classes.html
page when they click on a button located in home.component.html
?
The desired route should change from /home
to /home/classes
.