We have tried this issue with Angular like following step and no problem was found.
For Angular Version 5.1.3 and Angular Version 5.2.0;
For v5.1.3 :
For v5.2.0 :
When we check Account module is served under IdentityServer in Angular Version 5.1.3 and Angular Version 5.2.0.
Angular Version 5.1.3
Settings :
Permission :
Angular Version 5.2.0
Settings :
Permission :
The problem will be solved if you add the following code to app.module.ts and add the object to your providers array.
export interface RouterStateParams {
url: string;
params: Params;
queryParams: Params;
}
export class CustomRouterStateSerializer
implements RouterStateSerializer
{
serialize(routerState: RouterStateSnapshot): SerializedRouterStateSnapshot {
return {
root: this.serializeRoute(routerState.root),
url: routerState.url,
};
}
private serializeRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot {
const children = route.children.map(c => this.serializeRoute(c));
return {
url: route.url,
params: route.params,
queryParams: route.queryParams,
fragment: route.fragment,
data: {},
outlet: route.outlet,
component: null,
routeConfig: null,
root: null as any,
parent: null,
firstChild: children[0],
children: children,
pathFromRoot: null as any,
paramMap: route.paramMap,
queryParamMap: route.queryParamMap,
toString: route.toString,
};
}
}
{
provide: RouterStateSerializer,
useClass: CustomRouterStateSerializer,
},
I checked in version 5.3.3 but I did not produce this error. Can you write how did you have error step by step. And also can you write error log.
UserMenuService removeitem() allows you to remove items from the menu that you don't want.
import { APP_INITIALIZER } from '@angular/core';
import { eUserMenuItems } from '@volosoft/abp.ng.theme.lepton-x';
export const USERMENUPROVIDER = [
{ provide: APP_INITIALIZER, useFactory: userMenuRoutes, deps: [UserMenuService], multi: true },
];
function userMenuRoutes(userMenu: UserMenuService) {
return () => {
userMenu.removeItem(eUserMenuItems.LinkedAccounts);
userMenu.removeItem(eUserMenuItems.MyAccount);
userMenu.removeItem(eUserMenuItems.SecurityLogs);
};
}
We will take it to our roadmap for angular.
Did you import AccountLayoutModule Module ? When I reproduce this issue I have not take this error. If Error is continue can you share your envirement.ts ?
Can you check your import ? Import must be like below.
import { AccountLayoutModule } from '@volosoft/abp.ng.theme.lepton-x/account';
And also, is your theme is lepton-x ? Can you let me know which theme you are using?
Can you try it on cli ?
yarn add @abp/ng.theme.lepton-x/account