I need assistance with:
var body = {username:"ali", password:"p"};
this.http.post('http://localhost:27017/user/auth', body).subscribe(data =>
{console.log(data);});
Is there a way to populate the 'body' variable using form data binding? I am working on a login functionality where users input their username and password into fields. I want these user inputs to be passed as parameters in the second .post() method.