title: ControlValueAccessor not working when component inserted dynamically
body: <p>InputFieldComponent component developed using <code>implements ControlValueAccessor</code></p>
  
  <pre class="lang-js prettyprint-override"><code>constructor(public cd: ChangeDetectorRef) {
  
  }
  
  onTouchedCallback = () =&gt; { };
  onChangeCallback: any = () =&gt; { };
  
  // register a handler that should be fired when something in the view has changed
  registerOnChange(fn: any): void {
    this.onChangeCallback = fn;
  }
  
  // registers a handler specifically for when a control receives a touch event.
  registerOnTouched(fn: any): void {
    this.onTouchedCallback = fn;
  }
  
  // writes new values from the form model into the view or any DOM property
  writeValue(value: string): void {
    if (value !== this.innerValue) {
      this.innerValue = value;
    }
  }
  
  // textbox input change
  onChange(event: any): void {
    this.onChangeCallback(event.target.value);
  }
  </code></pre>
  
  <p>added dynamically like this.</p>
  
  <pre class="lang-js prettyprint-override"><code>const componentFactory = this.componentFactoryResolver.resolveComponentFactory(InputFieldComponent);
  const newComponent = container.createComponent(componentFactory);
  </code></pre>
  
  <p>Set up </p>
  
  <pre class="lang-js prettyprint-override"><code>form.addControl("firstname",
                  new FormControl("Some TEXT ", Validators.required));
  
  newComponent.instance.formControlName = "firstname"
  </code></pre>
  
  <p>trying to fire <code>writeValue</code> by writing below line :</p>
  
  <pre class="lang-js prettyprint-override"><code>newComponent.instance.cd.detectChanges();
  </code></pre>
  
  <p>but no luck, how do to solve this problem?  i want to see "Some TEXT" in textbox value.</p>
  
  <p>normally if i used this component html, it is working expected.</p>
  
  <p>here stackblitz link for what i tried : -</p>
  
  <p><a href="https://stackblitz.com/edit/angular-custom-input-init-value-d34jls" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-custom-input-init-value-d34jls</a></p>