title: Request body has value but I can't access it
body: <p>I am currently doing some user signup from angular2 front end to express back end. Everything is working fine except on getting the values from the request body. Take a look at this.</p>
  
  <p>usersRoute.js</p>
  
  <pre><code>userRouter.route('/signup')
      .post(function(req, res){
        console.log(req.body);
        mongoose.connect(url, function(err){
          var user = {
            username: req.body.username,
            password: req.body.password,
            firstname: req.body.firstname,
            lastname: req.body.lastname,
            gender: req.body.gender,
            address: req.body.address,
            contact: req.body.contact,
            email: req.body.email
          };
          console.log(user);
          users.create(user, function(err, results){
            // res.redirect('http://localhost:4200/login');
  
            //tobeChanged
            console.log(results);
            mongoose.disconnect();
          });
        });
      });
  </code></pre>
  
  <p>On the first console.log I am trying to look if there is a value on the req.body and then on the second console.log is when I am trying to see if the <em>user</em> variable got some value. This is what happens.</p>
  
  <p><a href="https://i.stack.imgur.com/Radz5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Radz5.png" alt="enter image description here"></a></p>
  
  <p>as we can see, <em>user</em> variable has no value but I am accessing it through req.body.<em>name</em>. Can someone help me clarify this?</p>
  
  <p>OPTIONAL QUESTION: Those \n is bothering me. How to get rid of it?</p>