Skip to content

Ngx meta.ngxmetaelementattributes

Home > @davidlj95/ngx-meta > NgxMetaElementAttributes

NgxMetaElementAttributes type

Models a <meta> element HTML's attributes as a key / value JSON object.

Almost equivalent to Angular's MetaDefinition

Only difference is http-equiv property. In an Angular's MetaDefinition, httpEquiv would also be accepted. This way there's no need to quote the key property. But without httpEquiv there's no need to map attribute names. So one bit of code less.

Signature:

export type NgxMetaElementAttributes = Partial<{
    charset: string;
    content: string;
    'http-equiv': string;
    id: string;
    itemprop: string;
    name: string;
    property: string;
    scheme: string;
    url: string;
    media: string;
}> & {
    [key: string]: string;
};