Lazy-loading NgModules in ASP.NET Core AngularSPA

Angular has this cool feature of loading a module lazily. Modules that are set up to load lazily can significantly save application startup time. Lazy-load module set up is done in application's routing configuration section. As the title suggests we will be using the AngularSPA template shipped with Visual Studio 2017 Preview (2) for demonstration. Route that is configured to lazy-load a module sends an HTTP GET to the server which in turns return the module in a chunk of code block. This only happens when the router is activated…

Keep reading

Adding Angular Material in ASP.NET Core Angular SPA template (Update 2.0.0)

If you are not familiar with ASP.NET Core SpaServices, take a look at this repository: Lots of SPA templates (Angular, React, Vue, Aurelia etc.) are available in this repo that uses NodeServices for server side rendering. We will work with the AngularSpa template and add Angular Material in it. To install the Spa templates via yeoman, first intall the template generator with the following command: npm install -g generator-aspnetcore-spa@next Create a directory where you will initialize the…

Keep reading