Open Closed

Angular Change Logo HREF on Login Pages #2297


User avatar
0
jackmcelhinney created
  • ABP Framework version: v4.4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hello. For Angular projects using authorization code flow, clicking the logo on the login, logout, and reset password pages by default redirects to the swagger page - i.e. href="/". Is there a way to easily override this link without overriding all of these pages? I currently have only replaced the logo from wwwroot/images/logo and the AppName from a custom BrandingProvider.

Thanks!


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can consider overriding the login page. https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

  • User Avatar
    0
    jackmcelhinney created

    Solved this by overriding the Lepton HeaderBrandViewComponent:

    Created Default.cshtml in the Host project at Themes/Lepton/Components/Header/Brand/Default.cshtml:

    @using Volo.Abp.Ui.Branding
    @using Microsoft.Extensions.Configuration;
    @inject IConfiguration _config
    @inject IBrandingProvider BrandingProvider
    <a class="navbar-brand" href="@_config["App:AngularUrl"]" alt="@BrandingProvider.AppName"></a>
    

    It may be nice at some point to add the href url to the BrandingProvider so those using angular can make all the necessary overrides for the login pages in one place.

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