title: Change the value of the variable based on another variable
body: <p>As the example below, when changing "a", I want "b" to also change,
  I'm using a method that uses the onfocusout function to capture the change event of "a" input, but is there any build-in way ?</p>
  
  <pre><code>@Component({
    selector: 'my-app',
    template: `
      &lt;div&gt;
        {{a}}
        a: &lt;input [(ngModel)]="a" /&gt;
        b: &lt;input [(ngModel)]="b" /&gt;
      &lt;/div&gt;
    `,
  })
  export class AppComponent implements OnInit {
    a = 0;
    b = this.a + 1; 
    constructor() { }
  }
  </code></pre>