How to have SPA with content pages

Hi Everyone,

I am a little bit confused when working with both content pages and SPA on a NodeJS project.

At first I thought having content/template structure is the same thing as SPA? (correct me if I am wrong), but then I figured that the pages are refreshing every time I change a page, so clearly I am not implementing the SPA correctly.

I have a template called main, and I am using it for most of my views, and I have followed this guide to implementing it.

Now I am not sure how to implement the SPA guide in the template page which I have. Below is an example of the code which I have on the template page.

<!-- pages views -->
	<section class="content-wrapper" id="pages">
		<%- await include(content, locals); %>
		<div is="dmx-route" id="dashboard" url="../views/dashboard.ejs" path="/dashboard" exact="true"></div>
		<div is="dmx-route" id="appointments" url="../views/index.ejs" path="/index" exact="true"></div>
	</section>
	<!-- /pages views --> 

I tried following this guide Creating Single Page Apps (SPA). But having both routes and content views confuses me a little bit and its not working with me, can someone tell me what is the right way to implement SPA in this case?

Community Page
Last updated: