diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html index 95508a9c..60ae686a 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -32,9 +32,10 @@
-
+
- + +

{{key.categoryName_en}}

diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 3290aa8c..e7622e64 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -5,7 +5,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { OfferDiscountService } from '../services/service'; import { IonInfiniteScroll } from '@ionic/angular'; - +import { DomSanitizer} from '@angular/platform-browser'; @Component({ selector: 'app-home', templateUrl: './home.component.html', @@ -31,7 +31,8 @@ export class HomeComponent implements AfterViewInit { public modalController: ModalController, public cs: CommonService, public offersService: OfferDiscountService, - public route: ActivatedRoute) { + public route: ActivatedRoute, + private sanitizer: DomSanitizer) { this.route .params.subscribe(val => { @@ -59,6 +60,9 @@ export class HomeComponent implements AfterViewInit { getCategories() { this.offersService.getCategories({}).subscribe((result) => { this.categories = JSON.parse(result.Mohemm_ITG_ResponseItem).result.data; //result.result.data; + for (let i = 0; i < this.categories.length; i++) { + this.categories[i].content = this.sanitizer.bypassSecurityTrustHtml(this.categories[i].content); + } this.cs.sharedService.setSharedData(this.categories, OfferDiscountService.categories); }); }