Skip to content

Instantly share code, notes, and snippets.

@kevinmerckx
Created November 6, 2018 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinmerckx/c13f16edeadf653a770b79eebc07e39b to your computer and use it in GitHub Desktop.
Save kevinmerckx/c13f16edeadf653a770b79eebc07e39b to your computer and use it in GitHub Desktop.
Tell Angular our component is a ControlValueAccessor
import { Component, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
@Component({
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => TagsComponent),
multi: true
}]
}) export class TagsComponent {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment