title: How to detect page refresh in .net core angular SPA template?
body: <p>I have project setup with .net core MVC SPA template. When the application is loaded, it loads angular spa into MVC.</p>
  
  <p>My startup configure has below code to load SPA.</p>
  
  <pre><code>        app.UseSpa(spa =&gt;
          {
              // 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.UseAngularCliServer(npmScript: "start");
              }
          });
  </code></pre>
  
  <p>Once the SPA is loaded, there is no contact with server side on the MVC site. However when the page is reloaded, I would like to intercept this call and do something with the HTTPRequest and HTTPResponse. How do I achieve this ? I do not have any controller in the MVC project.</p>
  
  <p>My project structure looks like this.</p>
  
  <p>WEB <br>
   - wwwroot <br>
   - ClientApp      ---> Angular spa <br>
   - Controllers    ---> Empty <br>
   - Pages          ---> Empty <br>
   - startup.cs <br>
   - program.cs <br></p>