Skip to main content

All Questions

-3 votes
0 answers
27 views

How to force FormlyFormOptions to rebuild hidden fields? [closed]

Suppose I have a form with 2 fields: Restaurant and Location. In my Angular ngOnInit, I first: this.model = this.versionedStorage.load() || new MyModel(); this.assignFields(); //this.fields = [...] ...
quantumpotato's user avatar
2 votes
1 answer
73 views

Reactive Form Control value not rendered on data bind update (Select/Dropdown) [closed]

Using a FormBuilder, 2 properties are created. One property (storefront) has a change event trigger which populates data to the select option of the other (countryCode). The countryCode is populated ...
Googs's user avatar
  • 841
1 vote
1 answer
64 views

How to add item below the current item through button click of Angular Formarray

Like it says, I want to add an item to the middle of a FormArray. So, I have a FormArray and every FormArray item has a button to add a new FormArray item. However, it currently always adds it to ...
HisDivineShadow's user avatar
2 votes
1 answer
64 views

Angular upgrade from v16 to v19 [closed]

I recently upgraded from angular v16 to v19 and the following code https://pastebin.com/3GhGmXQN <ng-container matColumnDef="lockIcon"> <th mat-header-cell *...
prashanth's user avatar
1 vote
1 answer
49 views

Reactive form module is getting time to render in case of edit mode

i am using angular reactive from module to my application here is my html code <form *ngIf="myForm" [formGroup]="myForm" (submit)="onSubmit()"> <mat-select ...
New User's user avatar
1 vote
1 answer
37 views

Issue with activating validators on Angular reactive form at runtime - using form.updateValueAndValidity()

I have a simple yet perplexing problem. I have a reactive form and I want to set validation programatically. this.boatForm.get('boatType').setValidators(Validators.required); this.boatForm....
Rob Mousley's user avatar
1 vote
1 answer
51 views

Using Angular 18, how can I have a Reactive Form with an Array of Text Form Controls?

In my Angular component, I have a Foo with a property bar which is an array of strings. I want to edit the list of text lines in my form. In my component, I declare barEditForm = new FormGroup({ ...
Vihung's user avatar
  • 13.4k
1 vote
1 answer
54 views

How to display All data with Angular mutual exclusion checkboxes

I'm trying to figure out how to display all identifier values(material table rows) if the ALL checkbox is checked. My current setup filters the rows based on identical values but the 'ALL' keyword is ...
spring_hiber's user avatar
1 vote
2 answers
120 views

How to use formControlName (ng_value_accessor) with ngComponentOutlet in Angular for dynamic form components

I'm working on a dynamic form in Angular where I need to use ngComponentOutlet to dynamically load different components based on the field type. However, I'm struggling to bind formControlName to ...
Lebanta's user avatar
  • 23
1 vote
2 answers
67 views

What is the relationship of NG_VALUE_ACCESSOR, ControlValueAccessor interface in angular?

What is the relationship of NG_VALUE_ACCESSOR, ControlValueAccessor interface in angular? Is if I have the following statement (provide:NG_VALUE_ACCESSOR) @Component({ selector: 'rm-header', ...
user1169587's user avatar
  • 1,396
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
2 votes
1 answer
35 views

How pass input value as FormGroup in Angular 17+

I'm trying to use Signals Input in angular 17 to pass a specific form. In the older approach works fine: @Component({ selector: 'app-user-data-create-update', standalone: true, imports: [...
devinvestidor's user avatar
1 vote
1 answer
44 views

How to reorder items in FormGroup?

I have element in a FormGroup, let say const langs = ['en', 'de'] form = new FormGroup({ languages: [langs, [Validators.required]] descriptions: initChildGroup(langs) }) initChildGroup(langs) { ...
Raphaël Balet's user avatar
1 vote
1 answer
50 views

How to properly handle mutually exclusive checkbox selection with reactive forms

I need some assistance with handling checkbox selection using angular. I have 4 checkboxes, ALL, FirstName, LastName, MiddleName. When the page loads ALL should be the only one selected. If I click ...
Sunny's user avatar
  • 167
1 vote
1 answer
48 views

Function inside parent is invoked when I open new modal window with child (same component activity)

I created activity.component.ts file that has selector: 'activity'. In it's html have this: <div matSuffix (click)="picker.open()"> <mat-form-field class="clicker"> ...
kamilws's user avatar
  • 181

15 30 50 per page
1
2 3 4 5
311