angular-reactive-forms Questions
2
Solved
I want my FormControl (FormGroup / FormArray) be strongly typed so when I have e.g.
interface SomeSource {
id: string;
name: string;
}
and I transformed it to e.g.
let form = new FormGroup<...
Davis asked 24/1, 2017 at 14:36
7
Solved
Under my Angular 6 app , i'm using Reactive Forms .
My purpose is when submitting , i want to set focus on first invalid input when error.
My form looks like this :
<form [formGroup]="addIt...
Cryo asked 25/12, 2018 at 17:40
2
Solved
I trying to build an Angular Reactive form where an account can add many students.
The form seems to work. When you hit Add Student it creates a new student but you check the console it say...
Ufa asked 16/7, 2018 at 15:4
2
Solved
In Ionic 2 I am trying to create a dynamic form which shall display a list of toggle buttons.
To do so I am trying to use a FormArray and relied on the Angular doc and mainly on this post
Based o...
Jaclyn asked 1/6, 2017 at 13:24
8
Solved
Need to know, when you have a multiple controls in a form and you want to know to which control user changed so that you can take some actions.
<input formControlName="item_name" #itemName (inp...
Unstoppable asked 1/6, 2018 at 0:29
8
I have the below code in my component:
if (form.controls['minRange'].hasError('min')) {
form.controls['minRange'].setErrors({ min: true });
}
I am getting the message in input as 'minRange is...
Zenda asked 31/1, 2020 at 8:14
4
Solved
I have a basic form shown below. I make a call to an API to grab the user's personal info and I want to fill the form fields with the appropriate values. I have been trying to use patchValue but I ...
Caro asked 8/8, 2018 at 22:26
5
The Angular FormControl has a valueChanges Observable that states:
Emits an event every time the value of the control changes, in the UI or programmatically.
Is there a way to set the FormCont...
Strikebreaker asked 16/4, 2018 at 15:43
7
UPDATE:
Issue with async validation successfully solved. But there is another issue with initial validation state.
See latest answer.
Here is the trick:
Have component with implemented ControlValu...
Gambrinus asked 12/12, 2019 at 22:11
3
Solved
I have a FormGroup with FormArray control filled with FormGroup instances
someForm = this.fb.group({
days: this.fb.array([
this.fb.group({
description: ['']
})
])
})
also, I have a getter f...
Atmo asked 8/4, 2021 at 9:2
7
Solved
I have this reactive Angular Form structure:
myForm: FormGroup;
Personal: FormGroup;
FIRST_NAME: FormControl;
LAST_NAME: FormControl;
ngOnInit(): void {
this.createFormControls();
this.createFor...
Vallery asked 31/7, 2017 at 9:59
2
Solved
Is there any way to disable the entire form in angular when using Reactive forms. I know it is possible to make them disable one by one.
this.tempForm = this.fb.group({
m26_type: '',
m26_name: ...
Borodino asked 24/8, 2017 at 6:1
2
Solved
In angular 4 i am creating a form that has a form array like so
this.formBuilder.group({
name: ['', [Validators.required, Validators.minLength(3)]],
required:false,
selectType: ['', [Validators...
Flaunty asked 17/7, 2017 at 13:33
2
I have angular form.
When I open the app, the console is log in fooValidation four times without me don't nothing.
in fooValidation
in fooValidation
in fooValidation
in fooValidation
Why? This is ...
Cranky asked 29/7, 2020 at 9:17
7
Solved
I am using Angular 6 with reactive forms and I am trying to figure out how to format the date value returned from a webapi. The date is displaying as 1973-10-10T00:00:00 and I want to format it to ...
Gassing asked 29/7, 2018 at 20:26
4
Solved
are reactive forms the way to go in order to have a component that can listen for changes in the validity status of the form it contains and execute some compoment's methods?
It is easy to disable...
Rosauraroscius asked 5/4, 2018 at 6:57
3
I have the simillar issue as here:
How do I resolve the error I am encountering using custom Validator syntax?
FormBuilder group is deprecated
I've read that Questions, but the issue still occurs i...
Alcoholize asked 20/1, 2021 at 17:23
4
The question is pretty self-explanatory. I would like to intercept the incoming value for a FormControl's value property, and be able to intercept the outgoing value to the HTML control that it's h...
Gurule asked 8/8, 2017 at 23:27
1
I'm creating a project with a Reactive Form; based on Recursive Component that creates Dynamic Form from JSON file.
The Sources
This is an adaptation from Ionic based on Creating Dynamic Angular F...
Califate asked 20/1, 2022 at 2:4
4
I am new to Angular, I use version 11.
And I have a problem with the formGroup attribute in my html file.
Error :
'FormGroup | null' is not assignable to type 'FormGroup'.
Type 'null' is not assign...
Khedive asked 10/3, 2021 at 11:10
1
Solved
So I have a form where a control is required only if another control has a value, for this I created the following structure
profileGroup = this.fb.group({
username: [''],
address: [
'',
[
(con...
Caslon asked 2/1, 2022 at 7:15
1
I'm working on creating a nested form group as shown in https://plnkr.co/edit/c93yFe2r83cvjiRvl6Uj?p=preview.
This is a fork of example from https://angular.io/docs/ts/latest/cookbook/form-valida...
Entablement asked 22/3, 2017 at 2:42
5
Solved
How do I validate that a mat-chip has been added to the mat-chip-list. I am using ReactiveForms. I have tried with the required validator.
The value can be a list of names, so I need to make sure...
Bolometer asked 26/11, 2018 at 14:32
7
Solved
I have a form with a lot of form controls and Validators for some of the controls, like:
title = new FormControl("", Validators.compose([
Validators.required
]));
description = new FormControl(""...
Glorianna asked 27/11, 2018 at 20:8
4
I thought it was an issue with my implementation but seems that my code for creating dynamic FormArray should be functional based from this question I raised. When I integrate it to my project, the...
Aloe asked 30/10, 2018 at 1:10
© 2022 - 2024 — McMap. All rights reserved.