Open Closed

Issue with Initial Home Page Visibility in Angular App #8544


User avatar
0
ninomartini created
  • Template: app
  • Created ABP Studio Version: 0.9.17
  • Tiered: No
  • Multi-Tenancy: Yes
  • UI Framework: angular
  • Theme: leptonx
  • Theme Style: dark
  • Database Provider: ef
  • Database Management System: sqlserver
  • Separate Tenant Schema: No
  • Mobile Framework: react-native
  • Progressive Web App: No
  • Public Website: No
  • Include Tests: Yes
  • Optional Modules:
    • GDPR
    • TextTemplateManagement
    • LanguageManagement
    • AuditLogging
    • OpenIddictAdmin

By default, the home page is shown first, and users can navigate to the login page from there.

However, I would like the application to start directly at the login page and only show the home page after the user has been authenticated. To achieve this, I added the canActivate: [authGuard] to account-routing.module.ts, which correctly makes the login page the default page when navigating to the root URL (e.g., http://localhost:4200).

Despite this, I am encountering an issue where the home page is briefly visible for a split second before the login page appears when initially accessing the application. I would like to prevent the home page from being visible before authentication.

Could you please provide guidance or suggestions on how to resolve this issue? Any help would be greatly appreciated.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can consider this https://stackoverflow.com/questions/78484369/when-my-auth-guard-is-called-it-renders-the-login-page-for-a-brief-moment-when-r

Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07