{{ news.short_title ? news.short_title : news.asset_title }}
-
+
diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss
index 27695b4..f95719a 100644
--- a/src/app/home/home.page.scss
+++ b/src/app/home/home.page.scss
@@ -145,15 +145,11 @@ ion-slides {
line-height: 1.5;
font-weight: 400;
display: -webkit-box;
- -webkit-line-clamp: 4;
+ -webkit-line-clamp: 3;
-webkit-box-orient: vertical;
color: var(--light-grey);
overflow: hidden;
transition: opacity 0.1s;
-
- p {
- margin: 0;
- }
}
.action-buttons {
diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index b181d30..f3971eb 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -3,6 +3,7 @@ import { IonSlides } from '@ionic/angular';
import { Router } from '@angular/router';
import { NewsService, IMAGE_BASE_URL } from '../services/news.service';
import { ToastService } from '../services/toast.service';
+import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'app-home',
@@ -35,9 +36,14 @@ export class HomePage implements OnInit {
constructor(
private router: Router,
private newsService: NewsService,
- private toastService: ToastService
+ private toastService: ToastService,
+ private dom: DomSanitizer,
) { }
+ transformYourHtml(htmlTextWithStyle) {
+ return this.dom.bypassSecurityTrustHtml(htmlTextWithStyle += '');
+ }
+
ngOnInit() {
this.newsService.getArticles().then((data: any) => {
if (data && data.content && data.content.items) {
diff --git a/src/app/services/news.service.ts b/src/app/services/news.service.ts
index c6fad8f..d49b39b 100644
--- a/src/app/services/news.service.ts
+++ b/src/app/services/news.service.ts
@@ -24,7 +24,7 @@ export class NewsService {
}
getVideoDetails(title_alias_from_listing_api: string) {
- return this.http.get('https://www.punjabkingsipl.in/api/video/' + title_alias_from_listing_api);
+ return this.http.get('https://www.punjabkingsipl.in/api/video/' + title_alias_from_listing_api).toPromise();
}
getGalleries() {
@@ -32,6 +32,6 @@ export class NewsService {
}
getGalleryDetails(title_alias_from_listing_api: string) {
- return this.http.get('https://www.punjabkingsipl.in/api/photo/' + title_alias_from_listing_api);
+ return this.http.get('https://www.punjabkingsipl.in/api/photo/' + title_alias_from_listing_api).toPromise();
}
}
diff --git a/src/global.scss b/src/global.scss
index 21a4862..c0fbed8 100644
--- a/src/global.scss
+++ b/src/global.scss
@@ -36,10 +36,6 @@
letter-spacing: 0.5px;
}
-p, header, h1, h2, h3, h4, h5, h6 {
- margin: 0;
-}
-
ion-content {
--background: transparent;
background: linear-gradient(to bottom, darken($brand-blue, 20%), $brand-blue 80%);