diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-10 10:33:36 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-10 10:33:36 +0100 |
commit | 758b996dc6effcab6031b32c0bd0b81f234c1a63 (patch) | |
tree | 8a40c0882bd00932bd9003077d4c0d3db456bf24 /client/src/app/app.module.ts | |
parent | 86e83939869976e9b4dfa6dc9d3785a284bd598c (diff) | |
download | PeerTube-758b996dc6effcab6031b32c0bd0b81f234c1a63.tar.gz PeerTube-758b996dc6effcab6031b32c0bd0b81f234c1a63.tar.zst PeerTube-758b996dc6effcab6031b32c0bd0b81f234c1a63.zip |
Client: switch to @nglibs/meta
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r-- | client/src/app/app.module.ts | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 482a9b5b7..02da38b38 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -2,7 +2,7 @@ import { ApplicationRef, NgModule } from '@angular/core'; | |||
2 | import { BrowserModule } from '@angular/platform-browser'; | 2 | import { BrowserModule } from '@angular/platform-browser'; |
3 | import { removeNgStyles, createNewHosts } from '@angularclass/hmr'; | 3 | import { removeNgStyles, createNewHosts } from '@angularclass/hmr'; |
4 | 4 | ||
5 | import { MetaModule, MetaConfig } from 'ng2-meta'; | 5 | import { MetaModule, MetaLoader, MetaStaticLoader, PageTitlePositioning } from '@nglibs/meta'; |
6 | import 'bootstrap-loader'; | 6 | import 'bootstrap-loader'; |
7 | 7 | ||
8 | import { ENV_PROVIDERS } from './environment'; | 8 | import { ENV_PROVIDERS } from './environment'; |
@@ -16,14 +16,17 @@ import { LoginModule } from './login'; | |||
16 | import { SharedModule } from './shared'; | 16 | import { SharedModule } from './shared'; |
17 | import { VideosModule } from './videos'; | 17 | import { VideosModule } from './videos'; |
18 | 18 | ||
19 | const metaConfig: MetaConfig = { | 19 | export function metaFactory(): MetaLoader { |
20 | //Append a title suffix such as a site name to all titles | 20 | return new MetaStaticLoader({ |
21 | //Defaults to false | 21 | pageTitlePositioning: PageTitlePositioning.PrependPageTitle, |
22 | useTitleSuffix: true, | 22 | pageTitleSeparator: ' - ', |
23 | defaults: { | 23 | applicationName: 'PeerTube', |
24 | title: 'PeerTube' | 24 | defaults: { |
25 | } | 25 | title: 'PeerTube', |
26 | }; | 26 | description: 'PeerTube, a decentralized video streaming platform using P2P (BitTorrent) directly in the web browser' |
27 | } | ||
28 | }); | ||
29 | } | ||
27 | 30 | ||
28 | // Application wide providers | 31 | // Application wide providers |
29 | const APP_PROVIDERS = [ | 32 | const APP_PROVIDERS = [ |
@@ -43,7 +46,10 @@ const APP_PROVIDERS = [ | |||
43 | 46 | ||
44 | AppRoutingModule, | 47 | AppRoutingModule, |
45 | 48 | ||
46 | MetaModule.forRoot(metaConfig), | 49 | MetaModule.forRoot({ |
50 | provide: MetaLoader, | ||
51 | useFactory: (metaFactory) | ||
52 | }), | ||
47 | 53 | ||
48 | AccountModule, | 54 | AccountModule, |
49 | CoreModule, | 55 | CoreModule, |