Skip to content

@for @if indentation #74

@diuming

Description

@diuming

No indentation in @for, @if ... in Angular template

@for (item of navItems; track item.path) {
<a mat-list-item [activated]="isActivated(item.path!)" [routerLink]="item.path">
    <mat-icon matListItemIcon>{{ item.data?.['icon'] }}</mat-icon>
    <span matListItemTitle>{{ item.data?.['label'] }}</span>
</a>
}

@if (true) {
<div></div>
}

Hop

@for (item of navItems; track item.path) {
    <a mat-list-item [activated]="isActivated(item.path!)" [routerLink]="item.path">
        <mat-icon matListItemIcon>{{ item.data?.['icon'] }}</mat-icon>
        <span matListItemTitle>{{ item.data?.['label'] }}</span>
    </a>
}

@if (true) {
    <div></div>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions