title: display the value entered in table
body: <p>creating table and displaying value on clicking submit button. The value to be displayed on submitting data</p>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component } from '@angular/core';
  @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
  })
  export class AppComponent {
      title = 'app1';
      private fieldArray: Array&lt;any&gt; = [];
      private newAttribute: any = {};
      addFieldValue() {
          this.fieldArray.push(this.newAttribute)
          this.newAttribute = {};
      }
      /* ngOnInit(){
      console.log(this.fieldArray);
      } */
  }
  </code></pre>