Styles Breadcrumb

This commit is contained in:
apapachristou 2019-05-29 17:10:55 +03:00
parent 87d3c89476
commit 0f1bad8115
2 changed files with 2 additions and 9 deletions

View File

@ -1,11 +1,11 @@
<div class="row" *ngIf="(buildBreadCrumb(this.activatedRoute) | async) as items" [class.app-breadcrumb]="items.length > 0">
<div *ngFor="let breadcrumb of items; let i = index; let length = count" class="col-auto">
<div class="row breadcrumb-item">
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params" class="navbar-brand breadcrumb-title col-auto active" *ngIf="currentUrl(breadcrumb)">
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params" class="navbar-brand breadcrumb-title col-auto active" *ngIf="i == (items.length - 1)">
<mat-icon *ngIf="breadcrumb.icon" class="icon mr-2">{{ breadcrumb.icon }}</mat-icon>
<span>{{ breadcrumb.label }}</span>
</a>
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params" class="navbar-brand breadcrumb-title col-auto" *ngIf="!currentUrl(breadcrumb)">
<a [routerLink]="[breadcrumb.url]" [queryParams]="breadcrumb.params" class="navbar-brand breadcrumb-title col-auto" *ngIf="i != (items.length - 1)">
<mat-icon *ngIf="breadcrumb.icon" class="icon mr-2">{{ breadcrumb.icon }}</mat-icon>
<span>{{ breadcrumb.label }}</span>
</a>

View File

@ -3,9 +3,6 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { BreadcrumbItem } from './definition/breadcrumb-item';
import { BreadCrumbResolverService } from './service/breadcrumb.service';
import { DashboardService } from '../../../core/services/dashboard/dashboard.service';
import { assertDataInRangeInternal } from '@angular/core/src/render3/util';
import { url } from 'inspector';
import { TranslateService } from '@ngx-translate/core';
@Component({
@ -47,8 +44,4 @@ export class BreadcrumbComponent implements OnInit {
navigate(url, params) {
this.router.navigate([url, params]);
}
currentUrl(breadcrumb) {
return (breadcrumb.url === this.router.url);
}
}