You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(NOTE: if you still have something like "@onecx:registry=https://gitlab.com..." in your .npmrc file then please remove it)
install latest version:
npm i @onecx/portal-layout-styles
npm i @onecx/integration-interface
npm i @onecx/accelerator
npm i @onecx/portal-integration-angular
npm i @onecx/keycloak-auth
allow multiple instances of portal-integration-angular
in webpackconfig.js remove the "singleton" and "strictVersion" property from: '@onecx/portal-integration-angular' and '@onecx/keycloak-auth'
add the following to webpackconfig.js inside the share: shared({}) property
use apiPortalConfigProvider instead of basepathProvider
// you have to look from where the api prefix comes from, because it does not have to be defined in the environment file
export function apiConfigProvider(configService: ConfigurationService, appStateService: AppStateService) {
return new PortalApiConfiguration(Configuration, environment.apiPrefix, configService, appStateService)
}
apps have to use initializeModuleGuard or your custom one which needs to extend InitializeModuleGuard see here
routing and canActivate
always use the InitializeModuleGuard from portal-integration-angular
to add the InitializeModuleGuard to your routes to properly set the translations for the apps in shell mode, use addInitializeModuleGuard() in RouterModule.forRoot() or .forChild()
if you need to add something additionally to the InitializeModuleGuard, then you have to create your own guard by extending the InitializeModuleGuard and use toObservable() like in the following example
add your custom InitializeModuleGuard as the second parameter to add it to the routes instead of the InitializeModuleGuard from portal-integration-angular