2017-12-11 19:29:57 -05:00
|
|
|
import { Component } from "@angular/core";
|
|
|
|
import { ActivatedRoute } from "@angular/router";
|
|
|
|
import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
|
|
|
|
|
|
|
|
@Component({
|
2021-09-01 19:01:01 -04:00
|
|
|
selector: "app-gcal-widget-wrapper",
|
2017-12-15 01:52:36 -05:00
|
|
|
templateUrl: "../fullpage-iframe/fullpage-iframe.component.html",
|
|
|
|
styleUrls: ["../fullpage-iframe/fullpage-iframe.component.scss"],
|
2017-12-11 19:29:57 -05:00
|
|
|
})
|
|
|
|
export class GCalWidgetWrapperComponent {
|
|
|
|
public embedUrl: SafeUrl = null;
|
|
|
|
|
|
|
|
constructor(activatedRoute: ActivatedRoute, sanitizer: DomSanitizer) {
|
2021-09-01 19:01:01 -04:00
|
|
|
const params: any = activatedRoute.snapshot.queryParams;
|
|
|
|
const embedUrl =
|
|
|
|
"https://calendar.google.com/calendar/embed?src=" + params.calendarId;
|
2017-12-11 19:29:57 -05:00
|
|
|
this.embedUrl = sanitizer.bypassSecurityTrustResourceUrl(embedUrl);
|
|
|
|
}
|
|
|
|
}
|