File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ export class CourseComponent implements OnInit {
28
28
29
29
constructor (
30
30
private route : ActivatedRoute ,
31
- private coursesService : CoursesService ) {
31
+ private coursesService : CoursesService ,
32
+ private title : Title ,
33
+ private meta : Meta ) {
32
34
33
35
}
34
36
@@ -38,6 +40,18 @@ export class CourseComponent implements OnInit {
38
40
39
41
this . course = this . route . snapshot . data [ "course" ] ;
40
42
43
+ this . title . setTitle ( this . course . description ) ;
44
+
45
+ this . meta . updateTag ( { name : "description" , content : this . course . longDescription } ) ;
46
+
47
+ this . meta . addTag ( { name : 'twitter:card' , content : 'summary' } ) ;
48
+ this . meta . addTag ( { name : 'twitter:site' , content : '@AngularUniv' } ) ;
49
+ this . meta . addTag ( { name : 'twitter:title' , content : this . course . description } ) ;
50
+ this . meta . addTag ( { name : 'twitter:description' , content : this . course . description } ) ;
51
+ this . meta . addTag ( { name : 'twitter:text:description' , content : this . course . description } ) ;
52
+ this . meta . addTag ( { name : 'twitter:image' , content : 'https://avatars3.githubusercontent.com/u/16628445?v=3&s=200' } ) ;
53
+
54
+
41
55
this . dataSource = new MatTableDataSource ( [ ] ) ;
42
56
43
57
this . coursesService . findAllCourseLessons ( this . course . id )
You can’t perform that action at this time.
0 commit comments