title: Angular2 @Input to a property with get/set
body: <p>I have an Angular2 component in that component it currently has a bunch fields that have @Input() applied before them to allow binding to that property, i.e.</p>
  
  <pre><code>@Input() allowDay: boolean;
  </code></pre>
  
  <p>What I would like to do is actually bind to a property with get/set, so that I can do some other logic in the setter, something like the following</p>
  
  <pre><code>_allowDay: boolean;
  get allowDay(): boolean {
      return this._allowDay;
  }
  set allowDay(value: boolean) {
       this._allowDay = value;
       this.updatePeriodTypes();
  }
  </code></pre>
  
  <p>how would I do this in Angular2?</p>
  
  <p>Based on Thierry Templier suggestion I changed it to, but that throws the error Can't bind to 'allowDay' since it isn't a known native property :</p>
  
  <pre><code>//@Input() allowDay: boolean;
  _allowDay: boolean;
  get allowDay(): boolean {
      return this._allowDay;
  }
  @Input('allowDay') set allowDay(value: boolean) {
      this._allowDay = value;
      this.updatePeriodTypes();
  }
  </code></pre>