title: Insert Angular Form Data in MongDB
body: <p>I have created a feedback form with angular and now i want to insert the data from the form into mongodb database(bookstore) in collection(feedback). I am inserting data in mongodb atlas and made the connection. I dont know what to do next.</p>
  <pre><code>contactus.component.ts
  
  import { Component, OnInit } from '@angular/core';
  import {NgForm} from '@angular/forms'
  @Component({
    selector: 'app-contactus',
    templateUrl: './contactus.component.html',
    styleUrls: ['./contactus.component.css']
  })
  export class ContactusComponent implements OnInit {
    
  
    constructor() { }
  
    ngOnInit(): void {
    }
    onSubmit(form:NgForm){
      console.log(form.value)         // FORM DATA VALUE 
    
      //..............
  
      //INSERT THE FORM DATA IN MONGO DB 
    }
  
  }
  </code></pre>
  <pre><code>feedback.js
  
  const MongoClient = require('mongodb').MongoClient;
  const uri = &quot;......&quot;;
  const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true });
  client.connect(err =&gt; {
      if(!err){
          console.log('MongoDB connected...')
      } else
      {
          console.log('Error in DB connection: ' + err );
      }
  });
  </code></pre>