DomSanitizationService is outdated from angular2 RC6
If you are using angular2 RC5 use this-
DomSanitizationService
If you are moving to angular2 RC6 use this-
DomSanitize
Here, is the complete example
import {DomSanitizer} from '@angular/platform-browser';
Then add in constructure
private sanitizer: DomSanitizer
and apply sanitizer on your variable like this
let text = <iframe width="977" height="733" src="https://www.youtube.com/embed/C0DPdy98e4c" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
text = this.sanitizer.bypassSecurityTrustHtml(text);
return text;