Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgMeta

Service that allows setting and updating of meta tags, title tags, and canonical tags.

Hierarchy

  • NgMeta

Index

Constructors

  • new NgMeta(_title: Title, _meta: Meta, _dom: Document): NgMeta
  • Parameters

    • _title: Title
    • _meta: Meta
    • _dom: Document

    Returns NgMeta

Properties

_scroll: boolean = false

Accessors

  • get meta(): Meta
  • Returns native Angular service for managing HTML <meta> tags.

    Returns Meta

    Native Angular service for managing HTML <meta> tags.

Methods

  • Scroll to top of page.

    Returns NgMeta

    Current instance of the NgMeta service.

  • Sets all meta details for page.

    Parameters

    • param0: AllMeta

      All meta details in head.

    Returns NgMeta

    Current instance of the NgMeta service.

  • setCanonical(canonical?: string): NgMeta
  • Sets canonical URL of web page.

    Parameters

    • canonical: string = ...

      The canonical URL for your page.

    Returns NgMeta

    Current instance of the NgMeta service.

  • setDescription(description?: string): NgMeta
  • Sets description of web page.

    Parameters

    • description: string = ''

      Description relating to the content of page.

    Returns NgMeta

    Current instance of the NgMeta service.

  • Sets Open Graph tags for optimal display on Facebook.

    Parameters

    • param0: FacebookMeta

      All Facebook Open Graph meta details in head.

    Returns NgMeta

    Current instance of the NgMeta service.

  • Sets microdata tags for optimal display on Google.

    Parameters

    • param0: GoogleMeta

      All Google microdata meta details in head.

    Returns NgMeta

    Current instance of the NgMeta service.

  • setScroll(scroll: boolean): NgMeta
  • Sets if after setAll window will scroll to top.

    Parameters

    • scroll: boolean

      Boolean of wether to scroll to top or not.

    Returns NgMeta

    Current instance of the NgMeta service.

  • Sets a HTML element in the head with any attributes defined in object.

    Parameters

    • tagType: TagType

      Tag name of HTML Element.

    • tagData: TagData

      Details for tag to set in head.

    • overwrite: boolean = false

      Whether this method should overwrite an existing instance of the tag. Set to false by default.

    Returns NgMeta

    Current instance of the NgMeta service.

  • setTitle(title?: string): NgMeta
  • Sets document's title shown in a browser's title bar or a page's tab.

    Parameters

    • title: string = ''

      Document's title.

    Returns NgMeta

    Current instance of the NgMeta service.

  • Sets tags for optimal display as a Twitter card.

    Parameters

    • param0: TwitterMeta

      All Twitter microdata meta details in head.

    Returns NgMeta

    Current instance of the NgMeta service.

Generated using TypeDoc