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.