import { Component, Input, Output, EventEmitter } from "@angular/core"; import { Subscription } from "rxjs"; import { IBreadcrumb } from "../../types"; @Component({ selector: "sam-breadcrumbs", templateUrl: "breadcrumbs.template.html", standalone: false, }) export class SamBreadcrumbsComponent { /** * The crumbs property expects an array of breadcrumbs. The last in the list * will be set as active */ @Input() crumbs: Array; /** * Emits when crumb action occurs */ @Output() public crumbAction: EventEmitter = new EventEmitter(); private _routeSubscription: Subscription; private count = 0; public crumbHandler(crumb: string) { this.crumbAction.emit(crumb); } }