Skip to content

Commit

Permalink
feat(meta): add meta tags from config
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Oct 2, 2019
1 parent 5333d11 commit 56aa55b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Renderer2 } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Title, Meta } from '@angular/platform-browser';

import { LanguageService, ConfigService, AnalyticsService } from '@igo2/core';
import { AuthOptions } from '@igo2/auth';
Expand All @@ -18,7 +18,8 @@ export class AppComponent {
private configService: ConfigService,
private analyticsService: AnalyticsService,
private renderer: Renderer2,
private titleService: Title
private titleService: Title,
private metaService: Meta
) {
this.authConfig = this.configService.getConfig('auth');

Expand All @@ -31,5 +32,10 @@ export class AppComponent {
if (theme) {
this.renderer.addClass(document.body, theme);
}

const meta = this.configService.getConfig('meta');
if (meta) {
this.metaService.addTags(meta);
}
}
}

0 comments on commit 56aa55b

Please sign in to comment.