Skip to main content

All Questions

1 vote
2 answers
49 views

How to send data from a component with no use of button to its parent in angular

I have host component and inside it there's three components(children). First child has a form with no submit button, while second child has again a form with submit button, Plus third child has just ...
Omar's user avatar
  • 53
0 votes
1 answer
80 views

Type Error: dir.valueAccessor.registerOnTouched is not a function

I have a child component that is a dropdown select and I need to add formControlName from ReactiveForms, but this dropdown is not implementing the ControlValueAccesor. When I Submit the form the error ...
IKERAGI's user avatar
  • 33
1 vote
2 answers
66 views

Dynamic custom component radio buttons do not have unique name when duplicated

I have the following form with a set of radio buttons in each section I can only select one of the buttons at any given time. It appears that they do not have unique names. The form is dynamically ...
Mark Hill's user avatar
  • 1,851
1 vote
1 answer
78 views

PrimeNG p-dropdown [disabled] does not appear to work in PrimeNG 17.18.x

I noticed a p-dropdown in PrimeNG 17.18.x when set in the disabled state ignores this state and can be focused and an item selected. In version 14.x it works fine. Can anyone shed some light on this ...
Damien Cooke's user avatar
1 vote
1 answer
482 views

Why my reactive form doesn't work in angular 19?

I am learning angular and trying to create reactive form for user authentification. To indicate if my firm work I added {{ LoginForm.value | json }. But it seems not to work. When I type something ...
Михайло Митровці's user avatar
0 votes
0 answers
212 views

submit, ngSubmit or click+keydown.enter for Angular 18+ and good accessibility?

Is there a consensus on the proper way to submit a form and have a good accessibility? <form (submit)="onSubmit()"> <button type="submit">Submit</button> </...
ymoreau's user avatar
  • 4,066
1 vote
1 answer
54 views

ngOnInit in an Angular reactive form

I am building a form with Angular reactive forms and i want to set a form control value with a property from a service, but when i submit the form, the form control value is not what I expected (the ...
Bayes-T's user avatar
  • 85
2 votes
1 answer
115 views

Clicking one radio button affects another despite separate FormControl instances

I'm encountering a peculiar issue with radio buttons in my Angular application. Despite using separate FormControl instances and unique for and id attributes for each pair of radio buttons, clicking ...
amirc's user avatar
  • 81
2 votes
1 answer
53 views

Issue with Dynamic FormControl Values Being Incorrectly Bound in Angular

EDIT: here is the Editor url for my Stackblitz app that shows in a simplified setting the problem of "transfer" of value between first control and second one. I'm working on a dynamic form ...
Patrick's user avatar
  • 2,729
-1 votes
1 answer
544 views

Input element unable to set with default value in mat-form-field

I want my input element in the <mat-form-field> to have a default value, but it doesn't work! I tested the input without <mat-form-field> and it works correctly. .html <mat-form-field ...
Rezvaneh Aftabgard's user avatar
0 votes
1 answer
54 views

Show validation error when dot or e is typed in to input type=number

I have an input type=number for a Percentage field. I only want the user to enter a number between 0 and 100. I want to disallow any decimal values such as 50.25, 60.2, 70.0. I also want to disallow ...
arunkumaraqm's user avatar
0 votes
1 answer
194 views

How to bind a formArray from parent component to child component and be able to change the values in the formArray using Angular reactive forms?

I have a parent component with a reactive form including controls and a from group. When choosing playerType dropdown I am adding to the fromGroup a formArray. The new form array will consits of 2 ...
MMario's user avatar
  • 25
2 votes
1 answer
89 views

How to create nested dynamic form elements

I want the select-option and input-text fields to be added once when I click on the Add button. I've already achieved this. That's okay. When I click on the Add Serv button, the input-text field in ...
Şebnem Seymen's user avatar
0 votes
1 answer
362 views

How to dynamically set default value in `select` control

I am subscribing to the HTTP server for the data to receive after which my select control gets loaded with the data by Angular framework. My goal is to set the default value. My default value consists ...
janci's user avatar
  • 519
1 vote
0 answers
41 views

How to insert placeholder, default selected value in a select/dropdown in angular

I am using reactive form. In a dropdown you cannot insert a placeholder I am trying to have a default value selected in my dropdown for students that do not have extra time allocated to them The ...
Zidane's user avatar
  • 1,904

15 30 50 per page
1
2 3 4 5
12