In DNN 8 the requirement to use User Controls will be removed. Module Controls can be pure HTML files with the extension .html or .htm, and the Module injection framework will load the html into an HtmlHostControl in a similar way to how MVC modules are handled.
Setting up your Environment
We still need to create a Visual Studio project to hold our Web API classes, so the environment setup is similar to what we used for MVC modules. In my project which is available on Github I have both modules in the same solution, so add a new Web ApplicationProject to your solution called Dnn.ContactList.Spa, choose the Empty template (1) and select Web API (2) so that the Web API references are added to your project.
Figure 1 – Creating a Web API project
After adding these files and removing the unnecessary files and folders created by the template you should have something like Figure 2.
Figure 2 – The Dnn.ContactList.Spa project
There is not much to comment on in this setup. SPA modules controls The manifest looks like any normal manifest except the controlSrc property has a .html extension. As with MVC modules the manifest should include a dependency node to indicate that the CoreVersion should be 8.0.0 or higher (see Figure 3)
Figure 3 – Sections of the Manifest file of note
That's it for our SPA module development environment. In the next blog post I will show how to display a list of Contacts in a SPA module.
For more information