1

I'm using node.js and passport for authentication, and I need to send 'login failed' message to the client if a user failed to authenticate. My application uses also express middleware. I'm using angular.js in the client.

Currently I'm using that command to show a static html:

var loginStatus = 'Failed';
res.sendfile('views/login.html'); // What should I add/change here in order to send the loginStatus variable ?

And this is my angular.js controller:

function MainController($scope) {
   $scope.loginStatus = // What should I write here in order to get 'Failed' ?
}

I've posted my questions on the remarks above.

ohadinho
  • 6,894
  • 16
  • 71
  • 124

0 Answers0