Skip to content

base href conflict #646

Closed
luke7oaks/angular-cli
#95

Description

Please, create base href replacement optionally.

Activity

  1. simon-sharp commented on May 12, 2016

    @simon-sharp

    Solution:

    Replace
    <base href="/">
    with
    <script>document.write('<base href="' + document.location + '" />');</script>
    in
    angular-cli\addon\ng2\blueprints\ng2\files\__path__\index.html

  2. filipesilva commented on Jun 18, 2016

    @filipesilva
    Contributor

    Closing in favor of #1064, which is more explicit.

  3. niklas-dahl commented on Jan 16, 2017

    @niklas-dahl
    Contributor

    @fdhadzh I tried your solution but it only works for routes like this: localhost:4200/xxx.
    The moment the route is one "layer" deeper it doenst work: localhost:4200/xxx/yyy or just localhost:4200/xxx/ (second slash).

    This is because without a base tag the generated script tags no longer refer relative to /:

    <script type="text/javascript" src="inline.bundle.js"></script>
    <script type="text/javascript" src="styles.bundle.js"></script>
    <script type="text/javascript" src="scripts.bundle.js"></script>
    <script type="text/javascript" src="vendor.bundle.js"></script>
    <script type="text/javascript" src="main.bundle.js"></script>
    

    I want to use svg markers that require relative FuncIRIs.

    @filipesilva Is this currently solvable with the current webpack setup?

    Thanks.

    Problem described here:
    https://stacksandfoundations.com/2016/06/22/svgs-funciri-angular2-and-the-base-tag/

  4. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort2: medium (days)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions