Styles Breadcrumb
This commit is contained in:
parent
87d3c89476
commit
0f1bad8115
|
@ -1,11 +1,11 @@
|
||||||
<div class="row" *ngIf="(buildBreadCrumb(this.activatedRoute) | async) as items" [class.app-breadcrumb]="items.length > 0">
|
<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 *ngFor="let breadcrumb of items; let i = index; let length = count" class="col-auto">
|
||||||
<div class="row breadcrumb-item">
|
<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>
|
<mat-icon *ngIf="breadcrumb.icon" class="icon mr-2">{{ breadcrumb.icon }}</mat-icon>
|
||||||
<span>{{ breadcrumb.label }}</span>
|
<span>{{ breadcrumb.label }}</span>
|
||||||
</a>
|
</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>
|
<mat-icon *ngIf="breadcrumb.icon" class="icon mr-2">{{ breadcrumb.icon }}</mat-icon>
|
||||||
<span>{{ breadcrumb.label }}</span>
|
<span>{{ breadcrumb.label }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,9 +3,6 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { BreadcrumbItem } from './definition/breadcrumb-item';
|
import { BreadcrumbItem } from './definition/breadcrumb-item';
|
||||||
import { BreadCrumbResolverService } from './service/breadcrumb.service';
|
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';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -47,8 +44,4 @@ export class BreadcrumbComponent implements OnInit {
|
||||||
navigate(url, params) {
|
navigate(url, params) {
|
||||||
this.router.navigate([url, params]);
|
this.router.navigate([url, params]);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentUrl(breadcrumb) {
|
|
||||||
return (breadcrumb.url === this.router.url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue