|
|
@@ -4,6 +4,7 @@ import { Location } from '@angular/common'; |
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
import { NewsService, IMAGE_BASE_URL } from '../services/news.service'; |
|
|
|
import { ToastService } from '../services/toast.service'; |
|
|
|
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-home-details', |
|
|
@@ -20,7 +21,8 @@ export class HomeDetailsPage implements OnInit { |
|
|
|
private location: Location, |
|
|
|
private dom:DomSanitizer, |
|
|
|
private newsService: NewsService, |
|
|
|
private toastService: ToastService |
|
|
|
private toastService: ToastService, |
|
|
|
private socialSharing: SocialSharing |
|
|
|
) { } |
|
|
|
|
|
|
|
getUrl(url) { |
|
|
@@ -31,6 +33,10 @@ export class HomeDetailsPage implements OnInit { |
|
|
|
return this.dom.bypassSecurityTrustHtml(htmlTextWithStyle += '<style type="text/css">p{ margin: 0px 0px 10px 0px; }</style>'); |
|
|
|
} |
|
|
|
|
|
|
|
share() { |
|
|
|
this.socialSharing.share(this.newsDetails.title, '', IMAGE_BASE_URL + this.newsDetails.image_path + this.newsDetails.image_file_name, this.newsDetails.hls_url ? this.newsDetails.hls_url : ''); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
let alias_title = this.route.snapshot.paramMap.get('alias_title'); |
|
|
|
let type = this.route.snapshot.paramMap.get('type'); |
|
|
|