Disable server-side rendering

If the problem persists, turning off the server-side rendering feature of the Microsoft.AspNetCore.SpaServices package could also help to understand the root of the issue. To disable such feature, perform the following changes to the /Views/Home/Index.cshtml file (updated lines are highlighted):

@{    ViewData["Title"] = "Home Page";}@* Enable server-side rendering *@@* <app asp-prerender-module="ClientApp/dist/main-server">Loading...</app> *@@* Disable server-side rendering *@<app>Loading...</app><script src="~/dist/vendor.js" asp-append-version="true"></script>@section scripts {    <script src="~/dist/main-client.js" asp-append-version="true"></script>}

As we can see, removing the asp-prerender-module tag helper ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.