File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export class CourseComponent implements OnInit {
26
26
27
27
constructor (
28
28
private route : ActivatedRoute ,
29
- private coursesService : CoursesService ) {
29
+ private coursesService : CoursesService ,
30
+ private title : Title ,
31
+ private meta :Meta ) {
30
32
31
33
}
32
34
@@ -41,7 +43,26 @@ export class CourseComponent implements OnInit {
41
43
this . coursesService . findAllCourseLessons ( this . course . id )
42
44
. subscribe ( lessons => this . dataSource . data = lessons ) ;
43
45
46
+ this . title . setTitle ( this . course . description ) ;
47
+
48
+ this . meta . addTag ( { name : "description" , content : this . course . longDescription } ) ;
49
+
50
+ this . meta . addTag ( { name : "twitter:card" , content : "summary" } ) ;
51
+ this . meta . addTag ( { name : "twitter:site" , content : "@AngularUniv" } ) ;
52
+ this . meta . addTag ( { name : "twitter:title" , content : this . course . description } ) ;
53
+ this . meta . addTag ( { name : "twitter:description" , content : this . course . description } ) ;
54
+ this . meta . addTag ( { name : "twitter:text:description" , content : this . course . description } ) ;
55
+ this . meta . addTag ( { name :"twitter:image" , content : "https://avatars3.githubusercontent.com/u/16628445?v=3&s=200" } ) ;
56
+
57
+
44
58
}
45
59
46
60
47
61
}
62
+
63
+
64
+
65
+
66
+
67
+
68
+
You can’t perform that action at this time.
0 commit comments