@memberjunction/ng-shared
Version:
MemberJunction: MJ Explorer Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages within the MJ Explorer App - do not use outside of MJ Explorer.
64 lines • 1.89 kB
TypeScript
import { Title } from '@angular/platform-browser';
import * as i0 from "@angular/core";
/**
* Service for managing browser tab titles.
* Provides a hierarchical naming scheme: "App Name - Resource/Page Name"
* Useful for bookmarks and browser history.
*/
export declare class TitleService {
private titleService;
private baseTitle;
private currentAppName;
private currentResourceName;
constructor(titleService: Title);
/**
* Set the base application title (e.g., "MemberJunction" or "Skip")
*/
setBaseTitle(title: string): void;
/**
* Get the current base title
*/
getBaseTitle(): string;
/**
* Set the current app name (e.g., "Sales", "Marketing")
* Pass null to clear the app context
*/
setAppName(appName: string | null): void;
/**
* Get the current app name
*/
getAppName(): string | null;
/**
* Set the current resource/page name (e.g., "Accounts", "Contact: John Doe")
* Pass null to show only the app name
*/
setResourceName(resourceName: string | null): void;
/**
* Get the current resource name
*/
getResourceName(): string | null;
/**
* Set both app and resource in one call
*/
setContext(appName: string | null, resourceName: string | null): void;
/**
* Reset to just the base title
*/
reset(): void;
/**
* Get the full current title
*/
getFullTitle(): string;
/**
* Build the title string based on current context
* Format: "BaseTitle - AppName - ResourceName" (with optional parts)
*/
private buildTitle;
/**
* Update the browser tab title
*/
private updateTitle;
static ɵfac: i0.ɵɵFactoryDeclaration<TitleService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<TitleService>;
}
//# sourceMappingURL=title.service.d.ts.map