title: How to get Button value and set it in input in angular/ionic
body: <p>I have this <code>html</code>button:</p>
  
  <pre><code>&lt;button ion-button class="button icon ion-home" round (click)="getColor()" id="one"&gt;0&lt;/button&gt;
  </code></pre>
  
  <p>I need to get the value('0' in this case) of this button when it is clicked.</p>
  
  <p>here is my <code>angular</code> code:</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  import { NavController } from 'ionic-angular';
  
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
    constructor(public navCtrl: NavController) {
  
    }
    getColor() { 
      document.getElementById("one").nodeValue="0";
  
    }
  
  }
  </code></pre>
  
  <p>I really tried for many hours to get this right but I couldn't. I'm new to <code>angular</code>. Someone please help me with this thing?</p>