Issue pull-requests for open source software
October 17, 2017
Set complex goals
November 1, 2017
 

Build a SPA that uses templates

 

Tuesday, October 31st, 2017

Build a SPA that uses templates

For this example I will be using the Clique app.

URL: https://ourclique.herokuapp.com/

Repo: https://github.com/CLIQUEg64/CLIQUE

Adding it to project

In this example we used handlebars templates to render the different pages. In order to do that, we must make sure that handlebars is installed and setup in the app.js

Templates

Next we setup all the handlebar page views, in the views folder, these are our templates

Expressions

Handlebars also allows to replace info with data from the database as seen above within the curly brackets. This way the SPA knows what to render.