Hello, I just upgraded from 8 to 9.2, and now when users want to edit their profile going to "My Account" it opens in a new tab, how can I bring back the functionality I had before, I even loose the left navigation, this is an urgent matter that I need resolved asap.
My front end is Angular
Before Upgrade:
After Upgrade:
7 Answer(s)
-
0
To restore the previous "My Account" experience in your Angular UI after upgrading to ABP 9.2, you should ensure that the Angular Account Module is properly integrated and that the user menu is configured to use the Angular route for the account/profile page, not the MVC endpoint.
Starting from ABP v4.3, the "My Account" link in the user dropdown should route to the Angular account module page instead of opening the MVC profile page in a new tab. If it opens in a new tab or loses the left navigation, it usually means the menu item is still pointing to the MVC endpoint or is using a target that opens a new window.
How to fix:
Check Your Menu Contributor:
- In your
*.MenuContributor.ts
(or similar), ensure the "My Account" menu item uses the Angular route, e.g.,/account/manage
, and does not settarget: '_blank'
or a full external URL.
Example:
- In your
context.menu.addItem( new ApplicationMenuItem( 'Account.Manage', 'My Account', '/account/manage', // Angular route 'fa fa-cog', 1000 ) );
2. **Remove/Update Old Links:** - If you have a link like `https://your-auth-server/Account/Manage?...` or set `target: '_blank'`, update it to use the Angular route and default target. 3. **Verify Account Module is Added:** - Make sure `@volo/abp.ng.account` is included in your Angular project and imported in your `app.module.ts`. ```typescript import { AccountConfigModule } from '@volo/abp.ng.account/config'; // ... imports: [ // ... AccountConfigModule.forRoot(), ]
- Rebuild and Test:
- Rebuild your Angular app and verify that clicking "My Account" now routes to the Angular page with the left navigation intact.
Reference:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
I still need help with this issue
-
0
I created a new solution from scratch and I can see the same behavior, I need a solution for this issue ASAP, the users are being sent to the MVC side, that is not a good user experience.
-
0
-
0
Hello, This decision was taken for design purposes previously. However, you can override this behavior by adding these providers to your
app.module.ts
@NgModule({ providers: [ // ... { provide: NAVIGATE_TO_MY_SESSIONS, useFactory: navigateToSessionsFactory, deps: [Injector], }, { provide: NAVIGATE_TO_MANAGE_PROFILE, useFactory: navigateToManageProfileFactory, }, { provide: NAVIGATE_TO_MY_SECURITY_LOGS, useFactory: navigateToMySecurityLogsFactory, }, ], }) export class AppModule {}
The relative factories should be added as follows:
import { AbpWindowService, RoutesService } from '@abp/ng.core'; import { inject } from '@angular/core'; import { eAccountRouteNames } from '@volo/abp.ng.account/public/config'; export function navigateToManageProfileFactory() { const windowService = inject(AbpWindowService); const routes = inject(RoutesService); return () => { const { path } = routes.find(item => item.name === eAccountRouteNames.ManageProfile); windowService.open(path, 'self'); }; } export function navigateToMySecurityLogsFactory() { const windowService = inject(AbpWindowService); const routes = inject(RoutesService); return () => { const { path } = routes.find(item => item.name === eAccountRouteNames.MySecurityLogs); windowService.open(path); }; } export function navigateToSessionsFactory() { const windowService = inject(AbpWindowService); const routes = inject(RoutesService); return () => { const { path } = routes.find(item => item.name === eAccountRouteNames.Sessions); windowService.open(path); }; }
You can let us know if you need further assistance. Thank you for your cooperation.
-
0
-
0
The problem you mentioned on the sidebar was solved in the previous version https://github.com/abpframework/abp/issues/22301. If you could provide the version for your
@volosoft/abp.ng.theme.lepton-x
package, I can assist further.You can let me know if you need further assistance. Thank you for your cooperation.