diff --git a/frontend/csyllabus/src/app/components/course/course.component.html b/frontend/csyllabus/src/app/components/course/course.component.html index 958e6c4..bdeab20 100644 --- a/frontend/csyllabus/src/app/components/course/course.component.html +++ b/frontend/csyllabus/src/app/components/course/course.component.html @@ -68,7 +68,7 @@ - + diff --git a/frontend/csyllabus/src/app/components/social/social.component.html b/frontend/csyllabus/src/app/components/social/social.component.html index ed828ad..d11b8cb 100644 --- a/frontend/csyllabus/src/app/components/social/social.component.html +++ b/frontend/csyllabus/src/app/components/social/social.component.html @@ -5,6 +5,7 @@

Share this Syllabus with your friends:

[stumbleUpOn]="false" [reddit]="false" [tumblr]="false" + [url]=url [title]=title [description]=description > diff --git a/frontend/csyllabus/src/app/components/social/social.component.ts b/frontend/csyllabus/src/app/components/social/social.component.ts index b70fbab..3f49256 100644 --- a/frontend/csyllabus/src/app/components/social/social.component.ts +++ b/frontend/csyllabus/src/app/components/social/social.component.ts @@ -4,7 +4,6 @@ import {Component, OnInit, Input} from '@angular/core'; import {AuthService} from "angular4-social-login"; import {FacebookLoginProvider, GoogleLoginProvider} from "angular4-social-login"; import {SocialUser} from "angular4-social-login"; - @Component({ selector: 'app-social', templateUrl: './social.component.html', @@ -16,6 +15,11 @@ export class SocialComponent implements OnInit { private user: SocialUser; private loggedIn: boolean; @Input() courseId: number; + @Input() title: string; + @Input() university: string; + @Input() country: string; + @Input() description: string; + private url: string; constructor(private authService: AuthService, private coursesService: CoursesService) { @@ -77,6 +81,7 @@ export class SocialComponent implements OnInit { this.user = user; this.loggedIn = (user != null); }) + this.url = "https://csyllabus.com/demo/course/"+this.courseId; this.coursesService.getAllCommentsByCourse(this.courseId).subscribe(res => { this.comments = res;