tried every syntax i can guess couldnt make it works !
{{post|json}}
The concept behind trackBy:
ngFor of angular automatically optimizes the display of modified/created/deleted objects by tracking through object identity.
So, if you create all new objects in the list and then use ngFor, it will render whole list.
Let's consider a scenario where despite of all ngFor optimizations, the rendering is still taking time. In that case we use trackBy. So that, we can provide another parameter to track objects than the object identity which is a default tracking criteria.
A running example:
Angular 2.1.2 + TypeScript Starter Kit
loading...