|
|
|
|
@ -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);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|