Ngx meta.makekeyvalmetadefinition
Home > @davidlj95/ngx-meta > makeKeyValMetaDefinition
makeKeyValMetaDefinition() function
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.
Signature:
makeKeyValMetaDefinition: (keyName: string, options?: {
keyAttr?: string;
valAttr?: string;
}) => NgxMetaMetaDefinition
Parameters
Parameter | Type | Description |
---|---|---|
keyName | string | Name of the key in the key/value meta definition |
options | { keyAttr?: string; valAttr?: string; } | (Optional) Specifies HTML attribute defining key, HTML attribute defining value. keyAttr defaults to name valAttr defaults to content |
Returns:
Remarks
One can think about some <meta>
elements as key / value pairs. For instance <meta name='description' content='Lorem ipsum'>
would actually be a key / pair meta where - description
is the key - Lorem ipsum
is the value - name
is the key's HTML attribute - content
is the value's HTML attribute
Value is set by NgxMetaMetaService.set() by providing this model and an actual value