https://github.com/jdegand/ngfor-optimization
Angular Challenges #36 ngFor Optimization
https://github.com/jdegand/ngfor-optimization
angular angular-challenges
Last synced: 6 months ago
JSON representation
Angular Challenges #36 ngFor Optimization
- Host: GitHub
- URL: https://github.com/jdegand/ngfor-optimization
- Owner: jdegand
- Created: 2023-10-03T23:45:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T20:39:36.000Z (over 2 years ago)
- Last Synced: 2025-06-05T21:48:30.797Z (8 months ago)
- Topics: angular, angular-challenges
- Language: TypeScript
- Homepage:
- Size: 122 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ngfor Optimization
[Angular Challenges](https://angular-challenges.vercel.app/challenges/angular-performance/36-ngfor-optimize/) #36 NgFor Optimization solution
## Built With
- [Angular](https://angular.io)
- [Angular CLI](https://github.com/angular/angular-cli) version 16.2.2.
## Thoughts
- Would be nice if person model had an id -> could just add trackBy without a custom function
- Using the profiler, it is tough to tell if the trackBy function is working.
- Looking at the elements of the app-list is better to tell that the whole list is not updating when using the input, the delete or update buttons.
## Useful Resources
- [Stack Overflow](https://stackoverflow.com/questions/47843856/angular-what-is-the-point-of-implementing-trackby) - angular what is the point of implementing trackby
- [Telerik](https://www.telerik.com/blogs/angular-basics-keep-track-incoming-data-angular-trackby-method#:~:text=The%20TrackBy%20Directive,-Angular%20came%20up&text=TrackBy%20and%20ngFor%20together%20allow,of%20rebuilding%20the%20whole%20array.) - angular basic keep track incoming data angular trackby method
- [Angular University](https://blog.angular-university.io/angular-2-ngfor/) - angular 2 ngFor
- [Github](https://github.com/angular/angular/issues/12969) - Supporting trackBy: expression|id #12969
- [Medium](https://medium.com/@ingobrk/here-is-how-you-can-use-trackby-with-a-property-name-ec3bbba8fa75) - here is how you can use trackby with a property name