May 2015
Beginner
220 pages
4h 16m
English
To handle the registration of users, we need to update both our frontend and backend code. The client-side part of the application will collect the data and the backend will store it in the database.
We updated the navigation and now, if users click on the Register link, the app will forward them to a /register route. We have to tweak our router and register a handler in the following way:
var Register = require('./controllers/Register');
Router
.add('register', function() {
var p = new Register();
showPage(p);
})As with the home page, we will create a new controller located in frontend/js/controllers/Register.js, as follows:
module.exports = Ractive.extend({ template: require('../../tpl/register'), components: ...Read now
Unlock full access