Skip to main content
-1 votes
2 answers
98 views

How to get checked checkbox vaule inside ngFor/ngIf?

I have data like so: const List: Array<Item> = [ { id: 1, name: 'somename' } ... ] Then html looks like this: <ng-container *ngFor="let item of list; let i = index;"&...
dozobus's user avatar
  • 29
1 vote
1 answer
54 views

How to use unique reference in a loop

With Angular I am using this date time picker in loop and I need to assign a unique reference. So far I hardcode it to req_d1 but it creates some problem. I would like to know how could I set a ...
Pierre's user avatar
  • 1,246
1 vote
1 answer
69 views

How to combine string and array in string interpolation of ngfor in Angular

I have an array of objects, I would like to combine a string and an array while showing in ngfor iteration. temp: [ { "value1": "as", "value2": "[a, b, c, ...
Naeem Akhtar's user avatar
1 vote
1 answer
64 views

Search working only on the current page in Angular 17

This search function is searching only from the shown page. If I'm on page1, it searches only on page1; Likewise, if I'm on page2, it searches only on page2. What changes do I need to do to fix this? ...
Elaine Byene's user avatar
  • 4,142
0 votes
2 answers
56 views

Passing data to the child component through loop Angular

I need to pass data from array in parent component to child component and for every element in array create child component with passing data in it. That's my parent component: @Component({ selector:...
Dmytro's user avatar
  • 51
-1 votes
1 answer
98 views

Sum for ngFor item using Angular 17

I am displaying data in a ngFor repeat. Here's my JSON: { "status": "success", "data": [ { "_id": "668aaab4d4f3277010802ad9&...
Elaine Byene's user avatar
  • 4,142
1 vote
3 answers
66 views

How to add object values from an array of multiple objects into an array readable for ngFor?

I get an array like this: obj_Array = [{"Information":{ID: 1, Name: "Frank"}},"Route":{Direction: "north", Time: 10:50:24},"Music":{volume: "loud&...
Hoonin's user avatar
  • 81
2 votes
1 answer
40 views

How to I create a Mat-Step with for loop which has individual components inside?

I have around 20 forms created as difference components and implemented with mat-stepper as below <mat-step> <form [formGroup]="form1"> <component1></...
Sam K's user avatar
  • 410
5 votes
2 answers
194 views

Why is this *ngFor loop rendering the data twice?

I have an NG Bootstrap Accordion element that, when open, displays a list of contact cards. For some reason the list of contacts output by the ngFor is duplicated and renders twice. The data is not ...
joed4no's user avatar
  • 1,363
1 vote
1 answer
93 views

Angular mat-menu in ng-template with ngFor

I'm trying to create an ng-template with ngFor instead of duplicated mat-menus in my html. But I'm having trouble with the menu trigger. I understand it needs to be unique for the trigger to work but ...
Adi Fuchs's user avatar
  • 271
0 votes
1 answer
191 views

Template/view using for directive is not getting updated with signal

I have this code. In debug I can see that WorkersComponent#workers are updated properly. Unfrotunatelly ui is not updated. What's wrong? @Component({ selector: 'app-planning-workers', templateUrl: ...
Damian Kapłon's user avatar
1 vote
1 answer
26 views

Creating a Angular table with dynamic columns with the count

I need to create table like below in Angular with my API data. Each product will have multiple station's with the count. What I need is Each product I need to display in a row also station needs to be ...
Velkumar's user avatar
  • 493
0 votes
0 answers
47 views

Ngx Formly repeat section with last element

I want to display checkbox element only in the last element of the repeat section. I'm trying with last part of the *ngFor; Stackblitz Instead true I would like to display checkbox element. Is there a ...
glistolin's user avatar
1 vote
1 answer
238 views

Custom angular directive is not working in WebStorm IDE. Expression expected in ngFor angular

I've created a custom directive called ngForFlTrackByIndex to be used inside ngFor. Everything is fine in vscode but in WebStorm complains Expression expected. Also the directive code: @Directive({ ...
Alireza Ahmadi's user avatar
1 vote
1 answer
35 views

Angular: property binding with the property name constructed inside the loop

I have multiple properties: tier1_eligibility: FormControl<boolean>; tier2_eligibility: FormControl<boolean>; tier3_eligibility: FormControl<boolean>; which I want to bind to ...
Dejan's user avatar
  • 1,028

15 30 50 per page
1
2 3 4 5
163