title: I have a problem when I input the data in input field and click the submit button
body: <p>In this when I fill the input field and click the submit button, showing the same data properly but email in undefined when check the email in console section then .......</p>
  <p>Here is my code</p>
  <p>Component.html</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
        &lt;h1&gt;Impact Data&lt;/h1&gt;
        
        &lt;form class=&quot;ml-5 mt-5 mr-5&quot;#formcontrol=&quot;ngForm&quot; 
        [formGroup]=&quot;impactdata&quot; 
        &gt;
  
          &lt;div class=&quot;form-group&quot;&gt;
            &lt;label for=&quot;exampleInputEmail1&quot;&gt;Email address&lt;/label&gt;
            &lt;input 
     id=&quot;exampleInputEmail1&quot;
     class=&quot;form-control&quot;
     aria-describedby=&quot;emailHelp&quot; 
     placeholder=&quot;Enter email&quot;
     type=&quot;email&quot;
     formControlName=&quot;email&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;form-group&quot;&gt;
            &lt;label&gt;Enter Your Impact Number&lt;/label&gt;
            &lt;input type=&quot;Number&quot; class=&quot;form-control&quot;  placeholder=&quot;How much record do you want to know?&quot;formControlName=&quot;number&quot;[(ngModel)]=&quot;number&quot;&gt;
          &lt;/div &gt;
          &lt;button 
          type=&quot;submit&quot;
          (click)=&quot;sendImpactdata(impactdata.value.number)&quot;
          class=&quot;btn btn-primary&quot;[disabled]=&quot;!impactdata.value.email || !impactdata.value.number&quot;&gt;Submit&lt;/button&gt;
        &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  <p>component.ts</p>
  <pre><code>      impactdata = new FormGroup({
          email: new FormControl(),
          number: new FormControl()
        });
        constructor(private SensorsService: SensorsService, private _firebaseService: FirebaseService, public toster: ToastrService) {
          this.rows = []
        }
        ngOnInit(): void {
        
      
        }   
    impactAlert(data) { 
        console.log(data,&quot;impactAlertimpactAlert&quot;,this.usermail);
      this.SensorsService.sendImpactWarning(this.usermail, data).subscribe(result =&gt; {
      });
    }
    sendImpactdata(number){
      this.SensorsService.getSansorData().subscribe(result =&gt; {
        this.rows = []
        var impactData = [];
        var impactCount: number = 0;
        for (let i = 0; i &lt; result.length; i++) {
          const sensorObj = result[i].payload.doc.data()['payload']
          var Finaldata = JSON.parse(sensorObj) 
          Object.assign(Finaldata, { id: result[i].payload.doc.id })
          if (Finaldata.Topic == 'IMPACT') {
            if (impactCount &lt;= number) { 
              impactData.push(Finaldata.Impact)
             if(impactCount == number){
              this.impactAlert(impactData);
              
             }
            }
            impactCount++;
          }
        }
       
      });
      this.impactdata.reset();
    }
       
  }
  </code></pre>
  <p>This is the error I get:</p>
  <blockquote>
  <p>In this code I have showing the same data in two times in the mail</p>
  </blockquote>