API Reference
ngx-meta package
Classes
Class | Description |
---|---|
NgxMetaCoreModule | Adds core providers of For standalone apps, use provideNgxMetaCore() instead |
NgxMetaJsonLdModule | Adds JSON-LD module metadata managers For standalone apps, use provideNgxMetaJsonLd() instead |
NgxMetaMetadataLoaderModule | Allows to load metadata modules after library has been initialized For standalone apps, use provideNgxMetaMetadataLoader() instead |
NgxMetaMetaService | Upserts (or removes) <meta> elements in the current page using Angular's Meta under the hood. |
NgxMetaOpenGraphModule | Adds Open Graph module basic & optional metadata managers For standalone apps, use provideNgxMetaOpenGraph() instead |
NgxMetaOpenGraphProfileModule | Adds Open Graph module profile metadata managers For standalone apps, use provideNgxMetaOpenGraphProfile() instead |
NgxMetaRoutingModule | Allows to manage metadata of a page by specifying it in its Angular's Route.data For standalone apps, use provideNgxMetaRouting() instead |
NgxMetaService | Manages the metadata values of the current page |
NgxMetaStandardModule | Adds standard module metadata managers For standalone apps, use provideNgxMetaStandard() instead |
NgxMetaTwitterCardModule | Adds Twitter Cards module metadata managers For standalone apps, use provideNgxMetaTwitterCard() instead |
Abstract Classes
Abstract Class | Description |
---|---|
NgxMetaMetadataManager | Abstract class every metadata manager must implement. Used as injection token to provide metadata managers the library will take into account. Can be created with makeMetadataManagerProviderFromSetterFactory() |
Functions
Function | Description |
---|---|
makeComposedKeyValMetaDefinition(names, options) | Creates a key / value meta definition (see makeKeyValMetaDefinition()) where the key is composed by several parts. |
makeKeyValMetaDefinition(keyName, options) | Creates a NgxMetaMetaDefinition for its use with NgxMetaMetaService by understanding <meta> elements as key / value pair elements. Read the API reference docs for more info. |
makeMetadataManagerProviderFromSetterFactory(setterFactory, opts) | Creates an Angular's Factory provider that provides an NgxMetaMetadataManager |
provideNgxMetaCore(features) | Adds core services of the library to the application. For module-based apps, use NgxMetaCoreModule.forRoot() instead Allows specifying some default metadata values. Keep reading. |
provideNgxMetaJsonLd() | Adds JSON-LD module metadata managers For module-based apps, use NgxMetaJsonLdModule instead |
provideNgxMetaMetadataLoader() | Allows to load metadata modules after library has been initialized For module-based apps, use NgxMetaMetadataLoaderModule instead |
provideNgxMetaOpenGraph() | Adds Open Graph module basic & optional metadata managers For module-based apps, use NgxMetaOpenGraphModule instead |
provideNgxMetaOpenGraphProfile() | Adds Open Graph module profile metadata managers For module-based apps, use NgxMetaOpenGraphProfileModule instead |
provideNgxMetaRouting() | Allows to manage metadata of a page by specifying it in its Angular's Route.data For module-based apps, use NgxMetaRoutingModule instead |
provideNgxMetaStandard() | Adds standard module metadata managers For module-based apps, use NgxMetaStandardModule instead |
provideNgxMetaTwitterCard() | Adds Twitter Cards module metadata managers For module-based apps, use NgxMetaTwitterCardModule instead |
withNgxMetaDefaults(defaults) | Allows to configure default metadata values. Use it as part of provideNgxMetaCore() For module-based apps, check out NgxMetaCoreModule.forRoot() |
Interfaces
Interface | Description |
---|---|
GlobalMetadata | Specifies metadata that will be used by more than one module |
GlobalMetadataImage | Specifies image metadata (will be used for link previews / social cards) to be used for more than one module. Like: - OpenGraph.image (needs standard module) - TwitterCard.image (needs Twitter Cards module) Open Graph allows for more attributes for the image. Specify OpenGraph.image if you want to customize those too. |
JsonLdMetadata | Utility type to provide specific JSON-LD module metadata |
MetadataResolverOptions | See NgxMetaMetadataManager.resolverOptions |
NgxMetaMetaDefinition | Models a Can be created with makeKeyValMetaDefinition() and makeComposedKeyValMetaDefinition() factory functions. |
NgxMetaRouteData | Utility type to ensure metadata values are set properly inside an Angular's Route.data You can also provide specific metadata module types to ensure type safety of the metadata values. Open the API to see an example. |
OpenGraph | Open Graph module metadata values that can be set |
OpenGraphImage | See OpenGraph.image |
OpenGraphMetadata | Utility type to provide specific Open Graph module metadata |
OpenGraphProfile | Open Graph profile metadata for this page |
Standard | Standard module metadata values that can be set |
StandardMetadata | Utility type to provide specific standard module metadata |
TwitterCard | Twitter Cards module metadata values that can be set |
TwitterCardCreatorId | See TwitterCard.creator |
TwitterCardCreatorUsername | See TwitterCard.creator |
TwitterCardImage | See TwitterCard.image |
TwitterCardMetadata | Utility type to provide specific Twitter Cards module metadata |
TwitterCardSiteId | See TwitterCard.site |
TwitterCardSiteUsername | See TwitterCard.site |
Variables
Type Aliases
Type Alias | Description |
---|---|
MetadataSetter | See NgxMetaMetadataManager.set |
MetadataSetterFactory | Utility type for a function that returns a MetadataSetter provided some dependencies (which should be able to be injectable) |
MetadataValues | Defines the metadata values to use for a page. Broadly speaking, it's just a JSON object |
NgxMetaMetaContent | Content to be set for a specific Can be |
OpenGraphProfileGender | Genders for OpenGraphProfile.gender property |
OpenGraphType | Types for OpenGraph.type property |
TwitterCardCreator | See TwitterCard.creator |
TwitterCardSite | See TwitterCard.site |
TwitterCardType | Card types for TwitterCard.card property |