Skip to content

Commit 16f2ff6

Browse files
committed
mend
1 parent e90643c commit 16f2ff6

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

libs/route-pages/ashes-page/src/lib/ashes-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ng-container *ngIf="(project$ | async) as project">
1+
<ng-container *ngIf="project">
22
<section class="first-section-half landing-section">
33
<div class="container">
44
<ng-container *ngIf="changeBreadCrumbTitle?.length">
@@ -202,7 +202,7 @@ <h1 class="main-title">Feedback</h1>
202202
</section>
203203

204204
<div class="container cursor-pointer">
205-
<iframe [src]="getSafeUrl(project.video)" style=" width: 100%; height:80vh;" allowfullscreen
205+
<iframe [src]="videoUrl" style=" width: 100%; height:80vh;" allowfullscreen
206206
allow="autoplay"></iframe>
207207
</div>
208208

libs/route-pages/ashes-page/src/lib/ashes-page.component.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ChangeDetectorRef, Component } from "@angular/core";
1+
import { ChangeDetectorRef, Component, OnInit } from "@angular/core";
22
import { GetPortfolioService, IPortfolio, MappedTechnology, Technologies, titleRefactoring } from "@valor-software/common-docs";
33
import { Observable } from "rxjs";
4-
import { DomSanitizer } from '@angular/platform-browser';
4+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
55
import { ITechnologiesCard, technologiesAndServices } from '@valor-software/common-docs';
66

77
const ROUTE = 'ashes-of-creation';
@@ -36,13 +36,14 @@ type AshesPortfolio = IPortfolio & {
3636
selector: "ashes-page",
3737
templateUrl: "./ashes-page.component.html"
3838
})
39-
export class AshesPageComponent {
39+
export class AshesPageComponent implements OnInit {
4040
changeBreadCrumbTitle?: { path: string, title: string }[] = [{ path: ROUTE, title: "Ashes of Creation" }];
4141

4242
imageSliderButtonClasses = 'bg-yellow_bg_col color-black';
4343

4444
project$: Observable<AshesPortfolio> = this.getProjectsServ.getPortfolioRequest(ROUTE);
45-
45+
videoUrl: SafeResourceUrl = '';
46+
project?: AshesPortfolio;
4647
technologiesCard: ITechnologiesCard[] = [
4748
{
4849
smJustify: "between",
@@ -93,6 +94,13 @@ export class AshesPageComponent {
9394
) {
9495
}
9596

97+
ngOnInit(): void {
98+
this.getProjectsServ.getPortfolioRequest(ROUTE).subscribe((project) => {
99+
this.project = project;
100+
this.videoUrl = this.getSafeUrl(this.project?.video);
101+
});
102+
}
103+
96104
getRouteLink(link: string): string {
97105
return titleRefactoring(link);
98106
}

0 commit comments

Comments
 (0)