Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 804
ErikHer Avatar asked May 30 '19 15:05

ErikHer


People also ask

How do I change the default value in FormControl?

1. Default Value. If we want to set a default value to our form control, we can pass a default value while instantiating a FormControl in our class. city = new FormControl('Noida'); married = new FormControl(true);


1 Answers

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

like image 170
Shifenis Avatar answered Oct 09 '22 07:10

Shifenis