Change routes: First login then main dashboard screen #1281
-
Greetings community, I am new and I was able to include prime-ng to an empty project, but I would like to change the sequence: first load the login window then the layout dashboard, but it has a strange behavior, it always redirects to the login. Could someone guide me? thank you. 20240223_190245.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, You need to create a new route containing your login page as the initial route. In the
In here you need to replace the initial path which loads the dashboardsmodule with your module or page to load. It should look like this:
And in the auth module or the module your login page is located
To learn and understand common routing tasks in angular please visit https://angular.dev/guide/routing |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi,
You need to create a new route containing your login page as the initial route. In the
app-routing.module.ts
file you'll see the code belowIn here you need to replace the initial path which loads the dashboardsmodule with your module or page to load. It should look like this: