title: Angular 6 ngFor values is updating when changing the input value
body: <p>I am not familiar with Angular 2, 3, 4 &amp; 5 and I am trying to get a better understanding of Angular 6.</p>
  
  <p><strong>Problem</strong>: I am pushing an user object to the users array then when I change the value of inputs, all the object inside the array is also changing.</p>
  
  <p>component.ts</p>
  
  <pre><code>public data; //user input id,age,first_name,last_name
  public users: User[] = [];
  
  constructor() {
      this.data = {};
  }
  
  ngOnInit() {
  }
  
  btnClick = function () {
      //push the user input to array
      this.users.push(this.data);
  };
  </code></pre>
  
  <p>Please check my sample code here: <a href="https://stackblitz.com/edit/angular-1ztg1k" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-1ztg1k</a></p>