Micro Service Template
In APP_ROUTE_PROVIDER, there is code routes.remove([eThemeSharedRouteNames.Administration]);
And then there is code
{
path: '/identity/roles',
name: '::Roles',
parentName: '::Administration',
layout: eLayoutType.application,
requiredPolicy: Permissions.ABPIDENTITY_ROLES,
} as ABP.Route,
{
path: '/identity/users',
name: '::Users',
parentName: '::Administration',
layout: eLayoutType.application,
requiredPolicy: Permissions.ABPIDENTITY_USERS,
} as ABP.Route,
Which means the app would only keeps two menu items under administration menu, however, after upgrade there are two administration side menu;
And when click Roles or Users menu, there is error: core.mjs:6843 ERROR RuntimeError: NG04014: Invalid configuration of route 'identity/'. The component must be standalone. In source code there is identity routes which replace Roles component:
export const Identity_ROUTES: Routes = [
{ path: '', redirectTo: 'roles', pathMatch: 'full' },
{
path: '',
component: RouterOutletComponent,
canActivate: [authGuard, permissionGuard, IdentityExtensionsGuard],
children: [
{
path: 'roles',
component: ReplaceableRouteContainerComponent,
data: {
requiredPolicy: 'AbpIdentity.Roles',
replaceableComponent: {
key: eIdentityComponents.Roles,
defaultComponent: RolesComponent,
} as ReplaceableComponents.RouteData<RolesComponent>,
},
},
....
4 Answer(s)
-
0
I figured out the reason, I replace the existing code:
export const APP_ROUTE_PROVIDER = [ { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService, AppConfigService], multi: true, }, ];
With: export const APP_ROUTE_PROVIDER = [ provideAppInitializer(() => { configureRoutes(); }), ];
After revert back, there is only one Administration menu, however, when I click Roles or Users menu item, it complains: src_app_identity_identity-routes_ts.js:1 ERROR RuntimeError: NG04014: Invalid configuration of route 'identity/'. The component must be standalone. Notes: The app is converted to standalone mode, and we write our own identity components to replace ABP's identity component.
-
0
Our app copied ABP 7.2.3 account and identity source code to Angular project, after revert to the original source code (module style), and fix several compile error. Now the admin menu works as before.
-
0
I am delighted to hear that your problem has been solved.
-
0
I am delighted to hear that your problem has been solved.
Can you help me on this thread? https://abp.io/support/questions/9210/ABP-Upgrade-to-911--Click-profile-icon---point-to-auth-server-pages