UNPKG

@davidlj95/ngx-meta

Version:

Set your Angular site's metadata: standard meta tags, Open Graph, Twitter Cards, JSON-LD structured data and more. Supports SSR (and Angular Universal). Use a service. Use routes' data. Set it up in a flash! 🚀

83 lines (78 loc) • 2.74 kB
// Generated by dts-bundle-generator v9.5.1 import * as i0 from '@angular/core'; import { EnvironmentProviders, ModuleWithProviders } from '@angular/core'; type MetadataValues = object; /** * Enables managing metadata of a page by specifying it in its Angular * {@link https://angular.dev/api/router/Route#data | Route#data} * * Use {@link NgxMetaRoutingModule.forRoot} method. Importing the module class alone does nothing. * * Check out {@link provideNgxMetaRouting} for the standalone, recommended API. * * @public */ export declare class NgxMetaRoutingModule { /** * {@inheritDoc NgxMetaRoutingModule} */ static forRoot(): ModuleWithProviders<NgxMetaRoutingModule>; static ɵfac: i0.ɵɵFactoryDeclaration<NgxMetaRoutingModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMetaRoutingModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxMetaRoutingModule>; } /** * Enables managing metadata of a page by specifying it in its Angular * {@link https://angular.dev/api/router/Route#data | Route#data} * * @remarks * * This is the standalone, recommended API. Using this API is preferred. * However, you may also use {@link NgxMetaRoutingModule.(forRoot:1)} as the Angular module-based equivalent API. * * @public */ export declare const provideNgxMetaRouting: () => EnvironmentProviders; /** * Utility type to ensure metadata values are set properly inside an Angular * {@link https://angular.dev/api/router/Route#data | `Route.data`} * * You can also provide specific metadata module types to ensure type safety * of the metadata values. Open doc details to see an example. * * @remarks * * If you don't specify a metadata values type, no type safety will be enforced * * ```typescript * const routeData: NgxMetaRouteData = { * meta: { invalid: 'values' } * } * ``` * * See example to enforce type safety on metadata values too. * * @example * With Typescript's {@link https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator | satisfies} * operator and specifying {@link GlobalMetadata} and {@link StandardMetadata} types * ```typescript * const routes: Routes = [ * { * // regular route stuff * data: { * meta: { title: 'Foo', standard: { keywords: ['foo', 'bar'] } } * } satisfies NgxMetaRouteData<GlobalMetadata & StandardMetadata> * } * ] * ``` * * See {@link https://ngx-meta.dev/guides/metadata-values-json/ | metadata values JSON guide} for more information * about typing the metadata values JSON object. * * @typeParam Metadata - Metadata values type * @public */ export interface NgxMetaRouteData<Metadata = MetadataValues> { meta: Metadata; } export {};