title: Why argument lost value after passing to another function?
body: <p>I'm using TypeScript 2 and Angular 2.
  After the argument (<code>idAttr</code>) was lost value and became NaN.
  The code is below:</p>
  
  <pre><code>addRow(event) {
      const target = event.target || event.srcElement || event.currentTarget;
      var idAttr = target.attributes.id;
      console.log(idAttr);
      this.addItem(+idAttr, "ewewe");
  }
  
  addItem(index:number, title:string): void {
      let item = new Register10SectionViewModel();
      item.SectionTitle = title;
      item.SectionId = +index;
      item.AssetType = "test";
      item.CauseDisposal = null;
      item.Num1 = 0;
      item.Num2 = 0;
      item.Num3 = 0;
      item.Num4 = 0;
      this.model.Register10Data = [...this.model.Register10Data, item];
  }
  </code></pre>
  
  <p><code>addRow(event)</code> it is event that's bind to button in loop</p>
  
  <pre><code>&lt;button (click)="addRow($event)" style="float: right" id="{{data1.id}}"&gt;+&lt;/button&gt;
  </code></pre>
  
  <p>In debug i see that's <code>idAttr</code> has valid value in <code>addRow</code> but in <code>addItem</code> argument became with NaN value. Why? Do I declare idAttr as a global variable?=) </p>