В вашем html head
отсутствует тег <base href="/" />
, поэтому Blazor ищет скрипт в /new-post
и ничего не может найти.
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Pep Club Locker - Team Apparel Printers & Shop </title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/business-frontpage.css" rel="stylesheet">
</head>
<body>
...
<!--Blazor:{"prerenderId":"4ae18037ad8d4418b898ea9715bbefab"}-->
<script src="_framework/blazor.server.js"></script>
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
<script src="_content/Blazor-Facebook-Analytics/interop.js"></script>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
Добавьте тег <base href="~/" />
в head
вашего _Host.cshtml
, чтобы решить вашу проблему.
_Host.cs html
<head>
<base href="~/" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Pep Club Locker - Team Apparel Printers & Shop </title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/business-frontpage.css" rel="stylesheet">
</head>