title: Routing in ASP.net core with Angular
body: <p>I have created a Asp.net core Web Api with Angular project in VS 2019. I accepted all defaulted setting and it's successufully launched. The question for me is how the index.html(along with Angular content/components) under ClientApp/src is choosen to be sent to the bowser as the default page. From Configure method of Startup.cs, I can see the routing configration as:</p>
  <pre><code> app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllerRoute(
                      name: &quot;default&quot;,
                      pattern: &quot;{controller}/{action=Index}/{id?}&quot;);
              });
  </code></pre>
  <p>What am I missing? My goal is to eventually create a combination of MVC, Angular with Areas and Api in one project.</p>
  <p><strong>Update:</strong>
  Below is the SPA part</p>
  <pre><code> app.UseSpa(spa =&gt;
        {//comments omitted
             spa.Options.SourcePath = &quot;ClientApp&quot;;
  
             if (env.IsDevelopment())
             {
                 spa.Options.StartupTimeout = new TimeSpan(0, 0, 80);
                 spa.UseAngularCliServer(npmScript: &quot;start&quot;);
              }
         });
  </code></pre>
  <p>TIA</p>