Starts in:
0 DAY
17 HRS
34 MIN
55 SEC
Starts in:
0 D
17 H
34 M
55 S
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

  • 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 !

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06