2.0.0 • Published 7 years ago

bedrock-angular-meta v2.0.0

Weekly downloads
6
License
-
Repository
github
Last release
7 years ago

bedrock-angular-meta

A module that improves SEO by dynamically setting meta tags in a Bedrock AngularJS application.

The following meta tag attributes are supported:

  • property
  • name
  • itemprop

Example Angular Controller

function Ctrl($document, $location, brMetaService) {

  brMetaService.set([
    // example `property` attributes
    {
      property: 'og:description',
      content: 'About Page - property'
    },
    {
      property: 'og:image',
      content: 'https://example.com/image.jpg'
    },
    {
      property: 'og:title',
      content: $document[0].title
    },
    {
      property: 'og:url',
      content: $location.absUrl()
    },
    // example `name` attribute
    {
      name: 'og:description',
      content: 'About Page - name'
    }
    // example `itemprop` attribute
    {
      itemprop: 'name',
      content: 'About Page - itemprop'
    }
  ]);
}
2.0.0

7 years ago