ngOnInit() { if (this.link) { // input this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(this.link); } else { this.subscription = this.activeroute.params.subscribe(params => { // routing this.link = params['url']; this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(this.link); }); } }
constructor(private projectService: ProjectService, private winRef: WindowRef, public dialog: MatDialog, private changeDetector: ChangeDetectorRef, private translateService: TranslateService, private gaugesManager: GaugesManager, private viewContainerRef: ViewContainerRef, private resolver: ComponentFactoryResolver, private mdIconRegistry: MatIconRegistry, private sanitizer: DomSanitizer) { mdIconRegistry.addSvgIcon('group', sanitizer.bypassSecurityTrustResourceUrl('/assets/images/group.svg')); mdIconRegistry.addSvgIcon('to_bottom', sanitizer.bypassSecurityTrustResourceUrl('/assets/images/to-bottom.svg')); mdIconRegistry.addSvgIcon('to_top', sanitizer.bypassSecurityTrustResourceUrl('/assets/images/to-top.svg')); // this.gaugesManager.stopDemo(); }
transform(url: any){ url = url.replace("watch?v=", "embed/"); return this.sanitizer.bypassSecurityTrustResourceUrl(url); }
loadLink(link: string) { this.link = link; if (this.link) { this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(this.link); } }
constructor ( protected _ngZone : NgZone , private _layoutService : LayoutService , private _socketService : SocketService , private _dataframeAccount : DataframeAccount , private _mouseService : MouseService , private _designerService : DesignerService , private _dataframeDesignerTree : DataframeDesignerTree , private _mdIconRegistry : MdIconRegistry , private _sanitizer : DomSanitizer ) { _mdIconRegistry .addSvgIcon( 'merge', _sanitizer.bypassSecurityTrustResourceUrl ( './assets/merge.svg' ) ); _mdIconRegistry .addSvgIcon('split', _sanitizer.bypassSecurityTrustResourceUrl ( './assets/split.svg' ) ); }
constructor ( protected _ngZone : NgZone , private _layoutService : LayoutService , private _socketService : SocketService , private _dataframeAccount : DataframeAccount , private _mouseService : MouseService , private _designerService : DesignerService , private _dataframeDesignerTree : DataframeDesignerTree , private _mdIconRegistry : MdIconRegistry , private _sanitizer : DomSanitizer ) { _mdIconRegistry .addSvgIcon( 'merge', _sanitizer.bypassSecurityTrustResourceUrl ( './assets/merge.svg' ) ); _mdIconRegistry .addSvgIcon('split', _sanitizer.bypassSecurityTrustResourceUrl ( './assets/split.svg' ) ); }