> For the complete documentation index, see [llms.txt](https://ngxf.gitbook.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ngxf.gitbook.io/platform/features/track-by-key.md).

# Track By Key

The trackByKey directive will create function for \*ngFor directive and will be using as trackBy.

## Using trackByKey

An example in `COMPONENT.template.html`.

```markup
<ng-container *ngFor="
  let item of [
    { animal: '🦊' },
    { animal: '🦄' }
  ] trackByKey 'animal'">
  {{ item.animal }}
</ng-container>
```
