https://github.com/fd/fd-angular-meta
https://github.com/fd/fd-angular-meta
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fd/fd-angular-meta
- Owner: fd
- License: mit
- Created: 2015-06-23T09:01:24.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-29T08:48:46.000Z (almost 10 years ago)
- Last Synced: 2025-03-05T14:47:06.938Z (over 1 year ago)
- Language: JavaScript
- Size: 938 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `fd-angular-meta`
[](https://travis-ci.org/fd/fd-angular-meta)
## Getting started
```js
import {bootstrap, State, Inject} from 'npm:fd-angular-core';
import {Meta} 'npm:fd-angular-meta';
@State({
template: `
{{ app.message }}
`
})
class AppController {
constructor() {
this.message = "Hello world!";
}
@Meta
@Inject('$location')
pushMeta($location) {
return {
url: $location.url(),
description: this.message
};
}
}
bootstrap(AppController); // => Promise
```
```html
My Website
```
## 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)