Trust store url

This commit is contained in:
Zakary Timson 2019-02-11 17:52:12 -05:00
parent 6ace8e9ab6
commit c9c050b6e5
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<!-- <div class="container-fluid" style="background-color: #53709f;"> --> <!-- <div class="container-fluid" style="background-color: #53709f;"> -->
<iframe class="w-100 border-0" src="http://screenprintingsuppliescanada.com" style="height: 100vh"></iframe> <iframe class="w-100 border-0" [src]="trust('https://screenprintingsuppliescanada.com')" style="height: 100vh"></iframe>
<!-- <!--
<div class="container-fluid bg-white"> <div class="container-fluid bg-white">
<div class="container"> <div class="container">

View File

@ -10,6 +10,7 @@ import {AppStore} from '../app.store';
import {Category} from './category'; import {Category} from './category';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {Product} from './product'; import {Product} from './product';
import {DomSanitizer} from '@angular/platform-browser';
@Component({ @Component({
selector: 'store', selector: 'store',
@ -24,7 +25,8 @@ export class CategoriesComponent {
private route: ActivatedRoute, private route: ActivatedRoute,
private dialog: MatDialog, private dialog: MatDialog,
public app: AppComponent, public app: AppComponent,
public store: AppStore public store: AppStore,
private sanatize: DomSanitizer
) {} ) {}
ngOnInit() { ngOnInit() {
@ -48,4 +50,6 @@ export class CategoriesComponent {
delete(obj) { delete(obj) {
this.dialog.open(DeleteComponent, {data: obj}); this.dialog.open(DeleteComponent, {data: obj});
} }
trust(url) { return this.sanatize.bypassSecurityTrustResourceUrl(url); }
} }