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.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ninomartini created

    I read the article, and I think I will take the approach of creating a blank splash screen.

    Thank you

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.