Embedding youtube videos onto ionic conference abstract detail page


#1

Hi everyone, I am not sure what I am doing wrong when trying to add a youtube video onto the abstract page of the ionic conference app. I use the DomSanitizer plus a pipe.

<iframe width="750" height="500" src="abstract.media | youtube" frameborder="0"></iframe>

youtube.ts

import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

/**
 * Generated class for the YoutubePipe pipe.
 *
 * See https://angular.io/api/core/Pipe for more info on Angular Pipes.
 */
@Pipe({
  name: 'youtube',
})
export class YoutubePipe implements PipeTransform {

  constructor (private dom:DomSanitizer) {
  }

  transform(value) {
    this.dom.bypassSecurityTrustResourceUrl(value);
  }
}