@if (loading()) {

{{ 'subcategories.loading' | translate }}

} @if (error()) {

{{ error() }}

} @if (!loading() && !error()) {

{{ parentName() }}

@if (nestedSubcategories().length > 0) {
@for (sub of nestedSubcategories(); track trackBySubId($index, sub)) {
@if (sub.img) { } @else {
{{ sub.name.charAt(0) }}
}

{{ sub.name }}

@if (sub.itemCount) { {{ sub.itemCount }} }
}
} @if (subcategories().length > 0) {
@for (cat of subcategories(); track trackByCategoryId($index, cat)) {
@if (cat.icon) { } @else {
{{ categoryName(cat).charAt(0) }}
}

{{ categoryName(cat) }}

}
} @if (categoryItems().length > 0) {

{{ 'subcategories.itemsInCategory' | translate }}

} @if (!hasSubcategories() && categoryItems().length === 0) {

{{ 'subcategories.emptyTitle' | translate }}

{{ 'subcategories.emptyDesc' | translate }}

{{ 'subcategories.goHome' | translate }}
} }