Skip to content

Update template links to be relative paths instead of absolute paths #16006

Closed

Description

@danroth27

The nav links and fetch data URL in the templates are all absolute paths with a leading slash, which means they don't honor the base path for the app. I think these paths should be relative paths (no leading slashes).

Activity

  1. danroth27 commented on May 16, 2018

    @danroth27
    MemberAuthor

    One potentially related issue is that a customer reported that if they change the nav link for the home page to be the empty string (href="") then they get a compilation error with the 0.4.0 dev builds:

    Error CS1525 Invalid expression term ')' WebApplication3 C:\Users\xxx\source\repos\WebApplication3\WebApplication3\obj\Debug\netstandard2.0\Shared\NavMenu.g.cs
    
    builder.AddAttribute(29, "href", );
    

    An empty string is a valid relative URI. I don't see this issue with 0.3.0.

    The customer was able to workaround this issue by using href="."

  2. SteveSandersonMS commented on May 24, 2018

    @SteveSandersonMS
    Member

    Fixed with dotnet/blazor#878.

  3. transferred this issue fromdotnet/blazoron Oct 27, 2019
  4. added
    area-blazor
    on Oct 27, 2019
  5. ghost locked as resolved and limited conversation to collaborators on Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions