5
5
*/
6
6
7
7
import { Component , Inject , NgZone , OnDestroy , OnInit , ViewChild , AfterContentChecked } from '@angular/core' ;
8
- import { Title } from '@angular/platform-browser' ;
8
+ import { Meta , Title } from '@angular/platform-browser' ;
9
9
import { ActivatedRoute , Router } from '@angular/router' ;
10
10
import { filter , map , publishReplay , refCount , tap , takeWhile } from 'rxjs/operators' ;
11
11
import { NB_WINDOW } from '@nebular/theme' ;
@@ -31,7 +31,8 @@ export class NgdPageComponent implements OnInit, AfterContentChecked, OnDestroy
31
31
private router : Router ,
32
32
private activatedRoute : ActivatedRoute ,
33
33
private structureService : NgdStructureService ,
34
- private titleService : Title ) {
34
+ private titleService : Title ,
35
+ private metaTagsService : Meta ) {
35
36
}
36
37
37
38
get showSettings ( ) {
@@ -70,7 +71,9 @@ export class NgdPageComponent implements OnInit, AfterContentChecked, OnDestroy
70
71
} ) ,
71
72
filter ( item => item ) ,
72
73
tap ( ( item : any ) => {
73
- this . titleService . setTitle ( `UI Kitten - ${ item . name } ` ) ;
74
+ this . titleService . setTitle ( `UI Kitten - ${ item . title } ` ) ;
75
+ this . metaTagsService . updateTag ( { name : 'description' , content : item . description } ) ;
76
+ this . metaTagsService . updateTag ( { name : 'keywords' , content : item . keywords } )
74
77
} ) ,
75
78
publishReplay ( ) ,
76
79
refCount ( ) ,
0 commit comments