Açık Kapalı

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


User avatar
0
AlainLeicht oluşturuldu

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 Cevap
  • User Avatar
    0
    Mehmet oluşturuldu

    Hi,

    Can you share your start and build commands with us?

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

    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 oluşturuldu

  • User Avatar
    0
    Mehmet oluşturuldu

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

  • User Avatar
    0
    AlainLeicht oluşturuldu

    It works fine now, thank you !

Made with ❤️ on ABP v8.2.0-preview Updated on Mart 25, 2024, 15:11