P
P
Pavel Talaiko2018-10-17 09:17:06
Angular
Pavel Talaiko, 2018-10-17 09:17:06

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

1 answer(s)
A
Andrey Sanych, 2018-10-17
@jsdevel

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 question

Ask a Question

731 491 924 answers to any question