@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
65 lines (64 loc) • 2.75 kB
TypeScript
import { AfterContentInit, ChangeDetectorRef, DoCheck, EventEmitter, OnDestroy } from '@angular/core';
import { Router, RouterLink, RouterLinkWithHref } from '@angular/router';
import * as i0 from "@angular/core";
/**
* Directive to provide notification or state changes for angulars @see RouterLink directive.
* The design of this directive is identical to @see RouterLinkActive
* and as such supports the same @see RouterLinkActiveOptions are supported.
*/
export declare class SmeRouterLinkDirective implements DoCheck, AfterContentInit, OnDestroy {
link: RouterLink;
linkWithHref: RouterLinkWithHref;
private router;
private changeDetectorRef;
/**
* The output for when the route is activated
*/
smeRouterLinkActivated: EventEmitter<void>;
/**
* The output for when the route is deactivated
*/
smeRouterLinkDeactivated: EventEmitter<void>;
/**
* Use the same input options as angulars @see RouterLinkActive Directive
*/
routerLinkActiveOptions: {
exact: boolean;
};
/**
* Placeholder for the current activation state
*/
private isActive;
private subscriptions;
/**
* Initializes a new instance of the @see PivotComponent class.
* @param link The router link that's defined for the element or child elements
* @param linkWithHref The router link with 'a' tags that's defined for the element or child elements
* @param router The angular router service
*/
constructor(link: RouterLink, linkWithHref: RouterLinkWithHref, router: Router, changeDetectorRef: ChangeDetectorRef);
/**
* Angulars AfterContentInit life cycle event
*/
ngAfterContentInit(): void;
/**
* Angulars OnChanges life cycle event
*/
ngDoCheck(): void;
ngOnDestroy(): void;
/**
* Updates the isActive state and fires appropriate events if that state has changed.
*/
private updateIsActive;
/**
* Indicates if a given link is active
* @param link the link to check
*/
private isLinkActive;
/**
* Indicates that at leased one link is active
*/
private hasActiveLinks;
static ɵfac: i0.ɵɵFactoryDeclaration<SmeRouterLinkDirective, [{ optional: true; host: true; }, { optional: true; host: true; }, null, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SmeRouterLinkDirective, "[routerLink][smeRouterLinkActivated],[routerLink][smeRouterLinkDeactivated]", never, { "routerLinkActiveOptions": "routerLinkActiveOptions"; }, { "smeRouterLinkActivated": "smeRouterLinkActivated"; "smeRouterLinkDeactivated": "smeRouterLinkDeactivated"; }, never, never, false, never>;
}