Cannot Get Message in ASP - Net Core Angular 6
Cannot Get Message in ASP - Net Core Angular 6
I am using Visual Studio 2017 15.8.3 with .Net Core 2.1 and Angular 6. I used the
template to create the project and upgraded it from Angular 5 to 6. It ran as
expected. I removed the template code and added my own. As I added more code I
started getting the Cannot GET/ message; however, if I go into any .ts file and
save it, refresh the browser everything reloads and comes up as expected. No errors
ever show. I can't see any issues.
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET
Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.Options.StartupTimeout = new TimeSpan(0, 0, 360);
spa.UseAngularCliServer(npmScript: "start");
spa.UseProxyToSpaDevelopmentServer("https://localhost:4200");
}
});
answer is :
Ok so this is kind of embarrassing but I am leaving this here just in case someone
runs into the same problem and can't figure it out.
I had copied a bunch of code over from a prototype project and I left out a file
that wasn't obvious. How did I find it? The Output window in Visual Studio! None of
the other tools showed anything.
The Visual Studio Output window and Error List are your buddies in these, and many
other situations.
another asnwer is :
I was facing the same problem. you need to do a little thing. Just remove the
deleted components and declarations from app.module.ts