mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
20 lines
763 B
TypeScript
20 lines
763 B
TypeScript
import { Component } from "@angular/core";
|
|
import { ActivatedRoute } from "@angular/router";
|
|
import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
|
|
|
|
@Component({
|
|
selector: "my-gcal-widget-wrapper",
|
|
templateUrl: "../fullpage-iframe/fullpage-iframe.component.html",
|
|
styleUrls: ["../fullpage-iframe/fullpage-iframe.component.scss"],
|
|
})
|
|
export class GCalWidgetWrapperComponent {
|
|
public embedUrl: SafeUrl = null;
|
|
|
|
constructor(activatedRoute: ActivatedRoute, sanitizer: DomSanitizer) {
|
|
const params: any = activatedRoute.snapshot.queryParams;
|
|
const embedUrl =
|
|
"https://calendar.google.com/calendar/embed?src=" + params.calendarId;
|
|
this.embedUrl = sanitizer.bypassSecurityTrustResourceUrl(embedUrl);
|
|
}
|
|
}
|