Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to control baseHref when serving up single-spa-angular app #519

Open
ethan-gerardot opened this issue May 17, 2024 · 1 comment
Open

Comments

@ethan-gerardot
Copy link

Question

Whenever I run npm run serve:single-spa:my-app (which is configured to run this command: ng s --ssl --project my-app --disable-host-check --port 9002 --live-reload false), then I get the following output:

** Angular Live Development Server is listening on localhost:9002, open your browser on https://localhost:9002/ **

I understand why it's serving on port 9002 (it's in the configured command), but I can't figure out how to control the base href so that the link is https://localhost:9002/my-app instead of just https://localhost:9002/

I've tried setting it in angular.json ("baseHref": "/my-app") like you would in a normal angular app, and I've tried setting it in app-routing.module.ts ( providers: [{ provide: APP_BASE_HREF, useValue: '/my-app' }],), but nothing seems to change it.

Environment

Libs:
"@angular/core": "^14.2.0",
"single-spa": ">=4.0.0",
"single-spa-angular": "^7.1.0",

@Arjun99
Copy link

Arjun99 commented Nov 16, 2024

Do you need the root-config application to be server on localhost:9002/my-app instead of localhost:9002? Is this the question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants