Setting ASP.NET Core 2.0 favicon

前端 未结 4 852
感动是毒
感动是毒 2021-02-19 07:17

I\'m trying to add and set favicon.ico.

When I saw a initial project that Visual Studio 2017 make automatically, the favicon.ico file is just in the w

4条回答
  •  情话喂你
    2021-02-19 07:31

    wwwroot/index.html file has the link to favicon.

    
    

    is the code to add favicon to the website.

    For .net core Single Page Application (SPA) project the favicon will be rendered from its own respective static file. For example if are using angular as client application there is index.html file inside src and in index.html you can link your favicon with following code

    
    

提交回复
热议问题