UNPKG

@this-dot/route-config

Version:

A library containing directives and services for configuring components via Route's routeData property

24 lines (23 loc) 1.06 kB
import { PipeTransform } from '@angular/core'; import { Observable } from 'rxjs'; import { RouteConfigService } from '../route-config.service'; import * as i0 from "@angular/core"; /** * Pipes an array of route tags and returns an Observable<boolean> that emits a boolean. * * The boolean is true if any of the values in the provided array is in the configured route tags of the activated route. * * @example * <!-- Use it chained with the async pipe --> * <ng-container *ngIf="routesWhereTheElementIsDisplayed | inRouteTags$ | async"> * The contents of this ng-container * </ng-container> */ export declare class InRouteTags$Pipe<RouteTag extends string = string> implements PipeTransform { private routeTagService; routeTags$: Observable<RouteTag[]>; constructor(routeTagService: RouteConfigService<RouteTag>); transform(tags: RouteTag[]): Observable<boolean>; static ɵfac: i0.ɵɵFactoryDeclaration<InRouteTags$Pipe<any>, never>; static ɵpipe: i0.ɵɵPipeDeclaration<InRouteTags$Pipe<any>, "inRouteTags$", false>; }