fd-angular-meta

1.1.0 • Public • Published

fd-angular-meta

Build Status

Getting started

import {bootstrap, State, Inject} from 'npm:fd-angular-core';
import {Meta} 'npm:fd-angular-meta';

@State({
  template: `<p>{{ app.message }}</p>`
})
class AppController {

  constructor() {
    this.message = "Hello world!";
  }

  @Meta
  @Inject('$location')
  pushMeta($location) {
    return {
      url: $location.url(),
      description: this.message
    };
  }

}

bootstrap(AppController); // => Promise
<head fd-meta>
  <!-- title will be replaced by fd-meta -->
  <title>My Website</title>
</head>

Options

  • url The cannonical url to the current page (defaults to $location.absUrl())
  • image Link to an image
  • title Title of the current page.
  • author Author of the current page.
  • publisher Publisher of the current page.
  • copyright Copyright holder of the current page.
  • description Description of the current page.
  • siteName Name of the website
  • type og:type (defaults to "website")
  • twitterHandle for the the twitter card.
  • status of the current page (default to 200)
  • distribution of the current page (default to global)
  • revisit-after of the current page (default to 7 days)

Readme

Keywords

Package Sidebar

Install

npm i fd-angular-meta

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • fd