title: How to transfer data from Angular to Node.js?
body: <p>I want to build a comment section in my Angular App. These comments are supposed to be stored in a database, so I want to forward the data from Angular to Node.js, where it can be passed on to the database. So I created an input field for comments in <em>detail.component.html</em>. The comment is saved when the user hits enter.  </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input #box (keyup.enter)="update(box.value)"&gt;
  &lt;p&gt;{{value}}&lt;/p&gt;
  </code></pre>
  
  <p>In <em>detail.component.ts</em> I save the comment in a variable: </p>
  
  <pre><code>public value: any= []
  update(comment: any) { this.value = comment; }
  //code
  this.dataService.addComment().subscribe(comment =&gt; this.value = comment)
  </code></pre>
  
  <p>Here is the first problem - how do I get the comment to <em>data.service.ts</em>?</p>
  
  <pre><code>//code
  addComment() {}
  </code></pre>
  
  <p>And then there is the actual question: How can I forward this comment to server.js in the node.js App? </p>
  
  <p>I am quite new to Angular, so I am pretty clueless of how to achive this. I found this question <a href="https://stackoverflow.com/questions/49548283">How to pass form data from angular to nodejs</a> samewhat useful, but could not apply it to my usecase. So how can I transfer the data from Angular to Node.js?</p>