Browse Source

Merge pull request #22797 from abpframework/auto-merge/rel-9-2/3700

Merge branch dev with rel-9.2
pull/22804/head
maliming 9 months ago
committed by GitHub
parent
commit
d5fd9966e4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md

5
docs/en/framework/ui/mvc-razor-pages/customization-user-interface.md

@ -89,7 +89,10 @@ This example overrides the **login page** defined by the [Account Module](../../
Create a page model class deriving from the ` LoginModel ` (defined in the ` Volo.Abp.Account.Web.Pages.Account ` namespace):
> If you are using the `AbpAccountWebOpenIddictModule` or `AbpAccountPublicWebOpenIddictModule`, the base class is `OpenIddictSupportedLoginModel` instead of `LoginModel`. And you should change the `ExposeServices` attribute to `[ExposeServices(typeof (MyLoginModel), typeof(OpenIddictSupportedLoginModel), typeof(LoginModel))]`
````csharp
[ExposeServices(typeof (MyLoginModel), typeof(LoginModel))]
public class MyLoginModel : LoginModel
{
public MyLoginModel(
@ -114,8 +117,6 @@ public class MyLoginModel : LoginModel
You can override any method or add new properties/methods if needed.
> Notice that we didn't use `[Dependency(ReplaceServices = true)]` or `[ExposeServices(typeof(LoginModel))]` since we don't want to replace the existing class in the dependency injection, we define a new one.
Copy `Login.cshtml` file into your solution as just described above. Change the **@model** directive to point to the `MyLoginModel`:
````xml

Loading…
Cancel
Save