How to Add a New SPAModule to a SPA Project?

  1. Create a new folder with the same name of the SPA module under the Views/Templates project folder.
  2. Right click on the newly created folder and choose new item.
  3. In the Visual Studio wizard select SPAModule and give it the same name of the previously created folder.
  4. The two Main.cshtml, and MainJs.cshtml  module definition files will be added to module folder.
  5. Open the Template.Controller.cs file, and use the commented out example code to create a new controller action method. Substitute MyModule with the actual name of your module.


This step by step video tutorial, and this tutorial may help.

Feedback and Knowledge Base