Answer the question
In order to leave comments, you need to log in
How to route components on the same page in Angular 6?
Hello dear toaster.
When studying Angular, I came across the need to change the routing on one page, let's say 2 components are located on the same page. Two tab Authorization and registration, when you click on the registration tab, the route in the address bar changed. How to do it.
Answer the question
In order to leave comments, you need to log in
Create two routes and one component (with two subcomponents: registration, authorization) for both routes. In the main component, check the current route and show the appropriate subcomponent
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question