File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/src/app/pages/website/website.page.ts
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from "@angular/router";
import { DomSanitizer } from '@angular/platform-browser';
import { HomeService } from '../../services/home.service';
@Component({
selector: 'app-website',
templateUrl: './website.page.html',
styleUrls: ['./website.page.scss'],
})
export class WebsitePage implements OnInit {
ios: boolean;
sectionName: any;
iframe: any;
constructor(
private router: Router,
private dom: DomSanitizer,
public route: ActivatedRoute,
public homeProvider: HomeService,
) { }
ngOnInit() {
this.sectionName = this.route.snapshot.paramMap.get("sectionName");
this.iframe = this.sanitizer(this.homeProvider._urlIframe);
}
back() {
this.router.navigate(["/app/tabs/home"]);
}
sanitizer(url: string) {
return this.dom.bypassSecurityTrustResourceUrl(url);
}
}