-1

whne I run, I need to pass a base path like /pis/

ng serve  --serve-path /pis/

I do this but it doesn't load anything. Anyone can help me to put a base path in ng serve operation?

Picco
  • 423
  • 2
  • 6
  • 21

1 Answers1

0

Did you mean --base-href?

Example usage:

ng serve --base-href /pis/

Edit:
From Angular Docs, see mention of --base-href here
And another option --baseHref here.

Maher
  • 151
  • 13
  • This reads more like a comment than an answer to me. One of the primary purposes of the question's comment section is to ask for clarification or more details from the asker. – starball Oct 16 '22 at 19:50
  • Do you have a link to the documentation for this option? I can [see docs for `--serve-path`](https://angular.io/cli/serve), but not for `--base-href`. I'm not an angular dev though. Am I missing something? – starball Oct 16 '22 at 19:51
  • I could not find a direct reference to the `--base-href` option but I see it used everywhere there: [example about deploying to GitHub Pages](https://angular.io/guide/deployment#deploy-to-github-pages). There is also a reference to a `--baseHref` option mentioned [here](https://angular.io/guide/i18n-common-deploy#deploy-multiple-locales) – Maher Oct 17 '22 at 07:38