title: Should ngModelChange work with custom form control?
body: <p>Let's say I'm making a custom form control. Can I do this?</p>
  
  <pre><code>&lt;custom-control [ngModel]="myModelVariable" (ngModelChange)="modelHasChanged($event)"&gt;&lt;/custom-control&gt;
  </code></pre>
  
  <p>I'm able to get [(ngModel)] working with all the form controls I've made, but I'm not able to check for changes. A lot of people using my components need this, and I'm wondering if there is a clean way to do it without creating @Output EventEmitters. I'm thinking I'm not doing something correctly, but maybe I'm wrong.</p>
  
  <p>This is a sample component implementation following the pattern I understand:</p>
  
  <pre><code>@Component({
    selector: 'custom-control',
    providers: [
      { provide: NG_VALUE_ACCESSOR, useClass: CustomControlComponent, multi: true }
    ]
  })
  export class CustomControlComponent implements ControlValueAccessor {
  
    private onChangeCallback: (_: any) =&gt; void = (_: any) =&gt; {};
    private onTouchedCallback: () =&gt; void = () =&gt; {};
  
    private innerValue: any;
  
    get value(): any {
      return this.innerValue;
    }
  
    set value(val: any) {
      if (val !== this.innerValue) {
        this.innerValue = val;
        this.onChangeCallback(this.innerValue);
      }
    }
  
    writeValue(val: any) {
      if (val !== this.innerValue) {
        this.innerValue = val;
      }
    }
  
    registerOnChange(fn: any) {
      this.onChangeCallback = fn;
    }
  
    registerOnTouched(fn: any) {
      this.onTouchedCallback = fn;
    }
  
  }
  </code></pre>