Addon to set title & meta tags in your EmberJS application
Usage
ember install ember-meta-meta
Set desired metas in your controller setup :
Route;
Will result into this HTML (open graph metas are using property automatically) :
This Is News Title
Title & metas are set only on didTransition
in case the route would be canceled.
Note: Open Graph tags, for sharing on Facebook or Twitter, will not correctly work without using FastBoot or some sort of server side rendering. All Google tags and data will work fine though because Google executes the JS.
Advanced options
You can use an instance initializer to add the following:
defaultTitle
: Default title set when none is provided by route.@title(value)
: Override the title function to append, prefix, etc.
Just run:
ember g instance-initializer after-meta
Then in the resulting initializer, do the following:
{ const meta = appInstance; meta; meta;} after: 'meta' name: 'after-meta' initialize;
Contributing
Use GitHub issues for questions, issues and feature requests.
See CONTRIBUTING.md for more details on contributing and running test.
Credits
Jean-Philippe Doyle Jimmy Bourassa