Angular странное поведение в производственном режиме - PullRequest
2 голосов
/ 12 февраля 2020

Когда я строю свой проект в производственном режиме ng build --prod --output-path=../Angular --base-href=/autopoint/ --deploy-url=/autopoint/Angular/, странная строка вверху html до появления тега, но когда я запускаю его с ng serve, он исчезает. Любые идеи, чем это может быть вызвано?

_Layout.cs html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AutoPoint</title>
    <base href="/" />
    <link href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,600,800&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

    @Styles.Render("~/Angular/Styles")
</head>
<body id="app">

@RenderBody()


    @Scripts.RenderFormat("<script src='{0}' type='module'></script>", "~/Angular/Scripts")
    @Scripts.RenderFormat("<script src='{0}' nomodule defer></script>", "~/Angular/ScriptsIE")
</body>
</html>

Index.cs html

<app-root></app-root>

enter image description here

enter image description here

1 Ответ

1 голос
/ 14 февраля 2020

Проблема решена. Невидимый символ пробела. enter image description here

...