Search code examples
javascriptnode.jsbackbone.jsserver-side

Server side redirect in backbone


I have model object:

module.exports = {
 redirectTo: function(params, callback) {
  callback(null, 'home/redirect_to');
 }
}

Can I redirect user without loading page?

It will depend on variables, so redirecting not always needed. The only thing I need now is redirecting from server-side.


Solution

  • It can be done using this.redirectTo(url)