April 2017
Intermediate to advanced
564 pages
24h 7m
English
So far, we have configured our client-side packages. In ASP.NET Core, we can add static files, security and MVC middleware. To implement security in an ASP.NET Core project, please refer to Chapter 10, Security Practices with .NET Core.
When developing an SPA application, we use the client-side framework heavily for routing modules and template rendering. Many client-side frameworks, such as Angular, provide their own routing modules to render pages in the main parent container. To enable those routing, we need to add the following spa-fallback entry followed by our MVC entry as shown next:
app.UseMvc(routes => { routes.MapRoute("default", "{controller=Home}/ {action=Index}/{id?}"); routes.MapRoute("spa-fallback", ...Read now
Unlock full access