Skip to main content
3 votes
1 answer
76 views

I've used ngFor for many years now, but have been interested in transitioning over to the newer @for as it seems to make the code a little cleaner (in my opinion). However recently I just discovered ...
Stanton's user avatar
  • 1,108
2 votes
1 answer
167 views

How to achieve this : When I click on right arrow of the carousel, I want to trigger a method with the item index as parameter. Some thing like <button ... (...)="eventHandler(index)" .....
KnowledgePath's user avatar
1 vote
1 answer
65 views

I want to bind an array of objects to inputs using *ngFor. Is it necessary to use the index property to get a stable behavior or the following code would work without causing trouble? <div *ngFor=&...
Joelton's user avatar
  • 11
1 vote
2 answers
69 views

I cannot seem to figure this one out even in searching all the answers for this issue. I have tried using a table, ul and div and nothing seems to be able to show the values of the json object that I ...
Jason Nance's user avatar
1 vote
2 answers
73 views

I made a directive in angular which is act as a time input and in template of component I repeated it based on an array of string. The directive has an @Input that is the initial value which is set to ...
vahid's user avatar
  • 25
1 vote
1 answer
28 views

I have an Object with nested object. I am trying to display in html using ngFor directive of Angular. But I got the result as multiple time. Below my object productlists = [ { productname: '...
Reegan's user avatar
  • 349
-1 votes
2 answers
147 views

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;"&...
SolisQuid's user avatar
1 vote
1 answer
73 views

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,286
1 vote
1 answer
80 views

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,621
1 vote
1 answer
97 views

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,163
0 votes
2 answers
78 views

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
  • 75
0 votes
1 answer
119 views

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

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
  • 83
2 votes
1 answer
76 views

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
  • 404
5 votes
2 answers
403 views

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

15 30 50 per page
1
2 3 4 5
163