-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I haven't found a way to use a subpath for the UI externally (without rebuilding the cloudify-stage/).
It would be great if you could include an option to set the baseUrl by, for example, reading environmental variable. For example in Vue.js: https://cli.vuejs.org/config/#publicpath, or with react https://medium.com/@svinkle/how-to-deploy-a-react-app-to-a-subdirectory-f694d46427c1. However these options will be only valid when re-building the application.
Also, in angular that is possible dynamically by using the localtion.pathname of the requests. It is something like:
export function getBaseLocation() {
let paths: string[] = location.pathname.split('/').splice(1, 1);
let basePath: string = (paths && !ROUTES_PATH.includes(paths[0]) && paths[0]) || ''; // Default: ''
return '/' + basePath;
}
And declaring in the providers:
{
provide: APP_BASE_HREF,
useFactory: getBaseLocation
}
Metadata
Metadata
Assignees
Labels
No labels