|
|
@@ -5,7 +5,7 @@ import { NewsService, IMAGE_BASE_URL } from '../services/news.service'; |
|
|
|
import { ToastService } from '../services/toast.service'; |
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
import { Uptime } from '@ionic-native/uptime/ngx'; |
|
|
|
|
|
|
|
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-home', |
|
|
@@ -41,13 +41,18 @@ export class HomePage implements OnInit { |
|
|
|
private newsService: NewsService, |
|
|
|
private toastService: ToastService, |
|
|
|
private dom: DomSanitizer, |
|
|
|
private uptime: Uptime |
|
|
|
private uptime: Uptime, |
|
|
|
private socialSharing: SocialSharing |
|
|
|
) { } |
|
|
|
|
|
|
|
transformYourHtml(htmlTextWithStyle) { |
|
|
|
return this.dom.bypassSecurityTrustHtml(htmlTextWithStyle += '<style type="text/css">p{ margin: 0px; }</style>'); |
|
|
|
} |
|
|
|
|
|
|
|
share(message: string, image?: string, url?: string) { |
|
|
|
this.socialSharing.share(message, '', image ? image : '', url? url : ''); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|
|
|
|
this.uptime.getUptime(true) |
|
|
|