Answer the question
In order to leave comments, you need to log in
Question about form control in Angular?
There is some kind of input field with a control. To me a call of a certain method the request with value from this field is sent.
It is necessary for me that at the very first request this field does not participate in the request, I achieved this by removing the default value in this field.
But this turned out to be the wrong decision. It is necessary that the value be there, but the request was also sent without this field.
I tried to create another control - and when initializing the component, I did it in the method where I need to try to do it like thistestControl = new Form Control()
setValue(1)
this.testControl = this.customControl as FormControl
Answer the question
In order to leave comments, you need to log in
It is necessary for me that at the very first request this field does not participate in the request, I achieved this by removing the default value in this field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question