title: Getter and Setter of Model object in Angular 4
body: <p>How can I make getter and setter work in my model class?</p>
  
  <p>My goal is to calculate integer value of the selected day when input, containing the date, updated. I was going to do it in setter, but Angular 4 ignores setter and getter of my model.</p>
  
  <p>My model class:</p>
  
  <pre><code>export class MyModel {
      @Input('date')
      get date(): String {
          console.log('Getting date');
          ...
      }
  
      set date(val) {
          console.log('Setting date: ' + val);
          ...
      }
  }
  </code></pre>
  
  <p>My template:</p>
  
  <pre><code>...
  &lt;input class="form-control" name="dp" [(ngModel)]="model.date"&gt;
  ...
  </code></pre>
  
  <p>But getter and setter don't work. What am I missing? </p>