Skip to content

Commit

Permalink
Avoid NG0956 error "The configured tracking expression..."
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Sep 6, 2024
1 parent 23e613f commit 0bc61c4
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
rootLabel || label
}}</a>
}
@for (parent of breadcrumbs; track parent) {
@for (parent of breadcrumbs; track parent.id) {
/
<a [routerLink]="isPanel ? [] : getLink(parent.id)" color="primary" mat-button>
{{ parent?.fullName || parent?.name }}</a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, Input} from '@angular/core';
import {Literal} from '../../types/types';
import {Literal, NameOrFullName} from '../../types/types';
import {NaturalIconDirective} from '../icon/icon.directive';
import {MatIconModule} from '@angular/material/icon';
import {RouterLink} from '@angular/router';
Expand Down Expand Up @@ -48,7 +48,7 @@ export class NaturalDetailHeaderComponent {
*/
@Input() public newLabel = '';
@Input({required: true}) public model!: Literal;
@Input() public breadcrumbs: Literal[] = [];
@Input() public breadcrumbs: NameOrFullName[] = [];
@Input() public listRoute: any[] = [];
@Input() public listFragment: string | undefined;
@Input() public link?: (id: string) => any[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</mat-tree>

<mat-chip-listbox aria-orientation="vertical" class="mat-mdc-chip-set-stacked">
@for (node of selectedNodes; track node) {
@for (node of selectedNodes; track node.model.id) {
<mat-chip-option (removed)="unselectModelNode(node)" [removable]="true" [selectable]="false">
@if (node.config.icon) {
<mat-icon [naturalIcon]="node.config.icon" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="dropdown-title mat-body-2">{{ data.title }}</div>
}
<mat-nav-list>
@for (facet of facets; track facet) {
@for (facet of facets; track $index) {
<mat-list-item (click)="selection = facet; close()">
<a>{{ facet.display }}</a>
</mat-list-item>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@for (selection of innerSelections; track selection) {
@for (selection of innerSelections; track $index) {
<natural-input
(cleared)="removeInput($index)"
(selectionChange)="updateInput($event, $index)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="natural-search" [ngClass]="{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}">
<div class="groupsWrapper">
@for (groupSelections of innerSelections; track groupSelections) {
@for (groupSelections of innerSelections; track $index) {
<div class="groupWrapper">
<natural-group
(selectionChange)="updateGroup($event, $index)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@if (nullLabel) {
<mat-option [value]="null">{{ nullLabel }}</mat-option>
}
@for (item of items | async; track item) {
@for (item of items | async; track item.value) {
<mat-option [value]="item.value" [disabled]="optionDisabled ? optionDisabled(item) : false">
{{ item.name }}
</mat-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[displayWith]="getDisplayFn()"
panelWidth="auto !important"
>
@for (item of items | async; track item) {
@for (item of items | async; track $index) {
<mat-option [value]="item">
<ng-template
[ngTemplateOutletContext]="{item: item}"
Expand Down
2 changes: 1 addition & 1 deletion src/app/navigable-list/navigable-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1 class="mat-headline-4">NaturalAbstractNavigableList</h1>
<div class="nat-expand nat-vertical">
<div class="nat-vertical">
<div class="nat-horizontal nat-wrap">
@for (item of breadcrumbs; track item) {
@for (item of breadcrumbs; track item.id) {
<a [routerLink]="getChildLink(item)" class="nat-no-padding" mat-button>
<mat-icon naturalIcon="chevron_right" />
<span>{{ item.name }}</span>
Expand Down

0 comments on commit 0bc61c4

Please sign in to comment.