Search code examples
angulartypescriptform-control

Can set some type for FormControl value?


Framework which I use (Angular 7).

I want set some type for FormControl like this.

    startDate: FormControl<NgbDate>;
    endDate: FormControl<NgbDate>;

Do you have any experience with it or it is not posible in angular?


Solution

  • For now it's not possibile. Check this issue to Angular GitHub Reactive forms are not strongly typed