Skip to main content
2 votes
1 answer
60 views

Facing an issue where a key has same value in another object in an array of objects. When ngModelChange is trigerred for 2nd one the data obtained in the ts file is of first one. I have data as ...
Akhil paul's user avatar
0 votes
1 answer
225 views

I added some trackBy functions on *ngFor directives of an Angular project in order to boost performances. There is one component with 2 lists of items. The trackBy function is the same for both lists ...
TCH's user avatar
  • 769
1 vote
3 answers
2k views

TL;DR: I already have working solutions, but I would like explanations why mat-select behaves like this. While building an application with Angular Material I run into this error when using mat-select ...
adrisons's user avatar
  • 3,733
0 votes
1 answer
218 views

I will be brief. Here's the problem on stackblitz: trackByBugntfree\ Explanation: Resources contain ppermission that are displayed on screen with checkboxes.\ Objective: When a "permission" ...
Zackysh's user avatar
  • 75
0 votes
1 answer
249 views

In this example https://stackblitz.com/edit/angular-ivy-hptdnu?file=src%2Fapp%2Fgrid%2Fgrid.component.html without trackBy the ngOnDestroy hook is triggered and the data updated I can understand it ...
user3887366's user avatar
  • 2,638
0 votes
0 answers
1k views

I want the ngFor not to re-render when the id change the index/position on the array. The trackBy method not working as I expected in this situation. Consider code below, In the TS File users: User[]...
oz1985oz's user avatar
  • 427
0 votes
1 answer
410 views

I am using track by function in my ionic angular app and while building the app, it gives me error: Type '(index: any, item: any) => any' is missing the following properties from type 'any[]': pop, ...
Kartik Solanki's user avatar
0 votes
1 answer
749 views

My question is how to use trackby on Async pipe with images rendering under it. I have done following. in html <div *ngFor="let friend of friends$ | async;trackBy:trackByFn"> <img [...
Ranjeet Avghad's user avatar
5 votes
1 answer
3k views

My component is some what like <div class="users-list" *ngIf="datasetPermission !== undefined"> <div *ngFor="let userpermission of datasetPermission; trackBy : trackByFn"> <...
Shubham Sharma's user avatar
2 votes
2 answers
844 views

Our web app uses ngRepeat to display a list of items. The array and its objects are never changed, but values of the objects inside can be modified by the user. We generate a unique trackId's for ...
Steve Fisher's user avatar
0 votes
2 answers
90 views

I have an app in angularjs which uses $interval() in background and requests datas form the database via PHP every seconds. I then use track by $index which really helps on performance. <tr ng-...
DuliNini's user avatar
  • 181
0 votes
1 answer
941 views

Using Ionic3 and virtualScroll works fine when I sort the list in the constructor but when I use a sort button on my page to change the sort order of the list, the sort is done but the list is not ...
pic's user avatar
  • 11
3 votes
2 answers
4k views

i'm having trouble sorting and array that has a trackBy function. The use case is as follows: I have an item array. All these items have a z-index property. I also have a layer manager that can edit ...
Martijn van den Bergh's user avatar
8 votes
1 answer
8k views

Since recently, the Angular styleguide-lint-extender "Codelyzer" is throwing warnings when you do not have a trackBy-function implemented on every *ngFor. I am wondering why this is considered an ...
Phil's user avatar
  • 7,712
0 votes
1 answer
183 views

// this.data = [{value: 'damon'}]; // this.dataOrf = [{value: 'damon'}, {value: 'mean'}] <md-select multiple ng-model="$ctrl.data" aria-label="data"> <md-option ng-value="opt" ng-repeat="...
Deamon's user avatar
  • 109

15 30 50 per page