Skip to content

Instantly share code, notes, and snippets.

import {Directive, OnDestroy, OnInit} from '@angular/core';
import {AbstractControl, ControlValueAccessor, FormGroup, NgControl} from '@angular/forms';
import {Subscription} from 'rxjs';
export abstract class AbstractControlComponent implements ControlValueAccessor {
private onTouchedFn: () => void;
protected constructor(public readonly controlDir: NgControl | null) {
if (controlDir) {