Open Closed

ng serve --base-href doesn't find assets #25


User avatar
0
AlainLeicht created

Hi,

When the Angular application is served with a base path (--base-href), then logo and favicon files loading result in a 404.
The console shows that the urls don't include the base path.
Rest of the application works fine.

Could you help me with that?

Thank you and best regards


6 Answer(s)
  • User Avatar
    0
    Mehmet created

    Hi,

    Can you share your start and build commands with us?

  • User Avatar
    0
    AlainLeicht created
    "start": "ng serve --baseHref=/my/base/path/",
    "build": "ng build --baseHref=/my/base/path/",
    
  • User Avatar
    0
    Mehmet created

    I fixed the logo problem but I have not encountered any errors related to favicon.

    Please share the head element in the index.html with me.

  • User Avatar
    0
    AlainLeicht created

    image.png

  • User Avatar
    0
    Mehmet created

    Everything looks good. Would you try again with base href="/". Does the problem continue in this way?

  • User Avatar
    0
    AlainLeicht created

    It works fine now, thank you !

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08