title: How to get id and name value of button on click event in ionic 2 angular 2
body: <p>I have a button</p>
  
  <pre><code>&lt;button ion-button icon-left name="0x10000011 (click)="AppService.sendNotify($event)" id="0x10000011" value=1&gt;
    &lt;ion-icon name="camera"&gt;&lt;/ion-icon&gt;
    CAM Icon
  &lt;/button&gt;
  </code></pre>
  
  <p>When I click on it, I want to get the <code>id</code> attribute in my service <code>sendNotify</code> function.</p>
  
  <pre><code>public sendNotify(data) {
    var method = 'SCAN_BUTTON';
    var name = data.target.name;
    var id = data.target.id;
    var value = data.target.value - 0;
    console.log("#$#$%$%^$%^#$%^#$%",method, name, value);
  }
  </code></pre>
  
  <p>Here I am not getting the button <code>id</code> and <code>name</code>. Instead</p>
  
  <pre><code>#$#$%$%^$%^#$%^#$% SCAN_BUTTON undefined NaN.
  </code></pre>
  
  <p>Can anyone help me to find my error?</p>