Open Closed

Using a custom javascript file in an override of My Account > Change Password #6350


User avatar
0
balessi75 created

ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme

Hi, We have successfully overridden the Change Password UI (see solution structure below). The problem is that we need to reference a new javascript file in the overridden page to augment it's functionality.

In Pages/Account/Components/ProfileManagementGroup/Password/Default.cshtml, we attempted to add the following and at runtime but the page never includes the javascript reference.

This didn't work:

@section scripts
{
   <script type="text/javascript" src="/Pages/Account/PasswordStrength.js"></script>

}

and this didn't work

@section scripts
{
    <abp-script-bundle name="@typeof(ManageModel).FullName">
        <abp-script src="/Pages/Account/PasswordStrength.js" />
    </abp-script-bundle>

 }

Is there something different that needs to be done with these view components (password, personalinfo, profilepicture, etc)?

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
    maliming created
    Support Team Fullstack Developer

    hi

    Replace the js file from typeof(ManageModel).FullName

    Configure<AbpBundlingOptions>(options =>
    {
        options.ScriptBundles
            .Configure(typeof(ManageModel).FullName,
                configuration =>
                {
                    configuration.AddFiles("/Pages/Account/Components/ProfileManagementGroup/Password/Default.js");
                    
                });
    });
    
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    balessi75 created

    Excellent, this was very helpful. Thanks @maliming!

    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.