(apps/academy) Added missing trackBy functions to '*ngFor's

This commit is contained in:
sercan 2021-04-26 16:41:21 +03:00
parent 88e98d002d
commit e90fb9e618
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@
<!-- Steps --> <!-- Steps -->
<div class="py-2 px-8"> <div class="py-2 px-8">
<ol> <ol>
<ng-container *ngFor="let step of course.steps; let last = last"> <ng-container *ngFor="let step of course.steps; let last = last; trackBy: trackByFn">
<li class="relative group py-6" <li class="relative group py-6"
[class.current-step]="step.order === currentStep"> [class.current-step]="step.order === currentStep">
<ng-container *ngIf="!last"> <ng-container *ngIf="!last">
@ -120,7 +120,7 @@
class="fuse-mat-no-header" class="fuse-mat-no-header"
[animationDuration]="'200'" [animationDuration]="'200'"
#courseSteps> #courseSteps>
<ng-container *ngFor="let step of course.steps"> <ng-container *ngFor="let step of course.steps; trackBy: trackByFn">
<mat-tab> <mat-tab>
<ng-template matTabContent> <ng-template matTabContent>
<div <div

View File

@ -36,7 +36,7 @@
[value]="'all'" [value]="'all'"
(selectionChange)="filterByCategory($event)"> (selectionChange)="filterByCategory($event)">
<mat-option [value]="'all'">All</mat-option> <mat-option [value]="'all'">All</mat-option>
<ng-container *ngFor="let category of categories"> <ng-container *ngFor="let category of categories; trackBy: trackByFn">
<mat-option [value]="category.slug">{{category.title}}</mat-option> <mat-option [value]="category.slug">{{category.title}}</mat-option>
</ng-container> </ng-container>
</mat-select> </mat-select>
@ -64,7 +64,7 @@
<!-- Courses --> <!-- Courses -->
<ng-container *ngIf="this.filteredCourses.length; else noCourses"> <ng-container *ngIf="this.filteredCourses.length; else noCourses">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mt-8 sm:mt-10"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mt-8 sm:mt-10">
<ng-container *ngFor="let course of filteredCourses"> <ng-container *ngFor="let course of filteredCourses; trackBy: trackByFn">
<!-- Course --> <!-- Course -->
<div class="flex flex-col h-96 shadow rounded-2xl overflow-hidden bg-card"> <div class="flex flex-col h-96 shadow rounded-2xl overflow-hidden bg-card">
<div class="flex flex-col p-6"> <div class="flex flex-col p-6">