I've developed an admin panel with a router for page navigation. The layout of the admin panel includes a sidebar (Component), header (Component), and content (Component). Within the content, I have inserted
<router-outlet></router-outlet>
to display different components based on routing. However, when using the LoginComponent for authorization, both the sidebar and header are displayed due to the <router-outlet></router-outlet>
being within the content component. To control the visibility of the sidebar and header, I initially used the *ngIf directive, but I believe there may be a better approach. Is there another way to achieve this setup?
For reference, my folder structure can be viewed here:
https://i.stack.imgur.com/rNMsn.png