Skip to content

Ngx meta.opengraph

Home > @davidlj95/ngx-meta > OpenGraph

OpenGraph interface

Open Graph module metadata values that can be set

Signature:

export interface OpenGraph 

Properties

Property Modifiers Type Description
description? readonly string | null

(Optional) Optional metadata.

A one to two sentence description of your object.

Can be set with GlobalMetadata.description

- Property specs

image? readonly OpenGraphImage | null

(Optional) Basic metadata.

An image which should represent your object within the graph.

Can be partially set with GlobalMetadata.image

locale? readonly string | null

(Optional) Optional metadata.

The locale these tags are marked up in. Of the format language_TERRITORY. If missing, assumed to be en_US as per Open Graph specs

Can be set with GlobalMetadata.locale

- Property specs

profile? readonly OpenGraphProfile

(Optional) Open Graph profile metadata for this page

Requires Open Graph Profile module / provider to work

- Open Graph profile type

- Open Graph profile specs

siteName? readonly string | null

(Optional) Optional metadata.

If your object is part of a larger website, the name which should be displayed for the overall site. e.g., "IMDb".

Can be set with GlobalMetadata.applicationName

- Property specs

title? readonly string | null

(Optional) Basic metadata.

The title of your object as it should appear within the graph, e.g., "The Rock".

Can be set with GlobalMetadata.title

- Property specs

type? readonly OpenGraphType | null

(Optional) Basic metadata.

The type of your object, e.g., "video.movie". Depending on the type you specify, other properties may also be required.

See OpenGraphType for a list of consts you can use to specify the type, so you don't have to write them yourself.

- Property specs

- Available object types in spec

url? readonly URL | string | null

(Optional) Basic metadata.

The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "https://www.imdb.com/title/tt0117500/".

Can be set with GlobalMetadata.canonicalUrl

- Property specs