NGXF
  • 🚀Introduction
  • Get Started
    • Why
    • Installation
  • Concepts
    • Introduction
  • Features
    • Activated Route
    • Call
    • Init
    • Lazy
    • Keep Alive
    • Timeout
    • Track By Key
    • Repeat
    • Virtual Scroll
  • Server Interaction
    • Async
    • Cookies
    • Http
    • Socket.IO
  • Hooks
    • State Hook
    • Effect Hook
    • Reducer Hook
  • Recompose
    • Compose
  • API
    • NgxfModule
    • HttpDirective
    • RouteDirective
    • InitDirective
    • ComposeDirective
    • ReturnDirective
    • TimeoutDirective
    • CookiesDirective
    • AsyncDirective
    • LazyDirective
    • CallPipe
  • Recipes
    • Caching
    • Style Guide
  • Community
    • FAQ
    • Contributing
Powered by GitBook
On this page
  1. Features

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.

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

Last updated 6 years ago