Best practices and sample code
You can follow the best practices and refer the sample code in this section while customizing the application.
Include the following 2 static properties in the
store-customization-impl.ts file without changing their default access
modifiers. Failing to do so would result in build failure of customization files. Any new properties
added in store-customization-impl.ts would be
ignored.
A sample store-customization-impl.ts file is as
follows:static featureModuleExtensionRoutes: Routes = [];
static extensionPersonaConfigList: IPersonaConfig[] = [];
export class StoreCustomizationImpl extends StoreCustomizationBase {
static featureModuleExtensionRoutes: Routes = [
{
path: 'user',
loadChildren: './../features/user/user.module#UserModule'
}
];
static extensionPersonaConfigList: IPersonaConfig[] = [
{
personaName: 'User_Management',
personaIconClass: 'app-icon-inventory_mgmt_20',
portlets: [
{
portletTitleBundleKey: 'userPortlet.TITLE_UserPortlet',
portletSequenceNumber: 4,
portletComponent: UserComponent,
portletTID: 'userPortlet',
resourceId: 'ISF000003'
}
]
}
];
}
Note: Any changes to store-customization-impl.ts requires a server
restart.