DomSanitizationService is not a function <p>As people always say there is no question called a dumb question.</p> <p>I am learning Angular 2.0 following the official tutorial now. It is using rc2.0 as I can see from the packageconfig file. I was trying to suppress the frame work complaining the "Unsafe" url in the iFrame tag.</p> <p>I have checked the instructions from this <a href="http://stackoverflow.com/questions/38037760/how-to-set-iframe-src-in-angular-2-without-causing-unsafe-value-exception">Stack Overflow Question</a> and followed everything that's been shown in the LIVE Plunker.</p> <p>My VS Code doesn't complain anything in the compile time but from the Chrome inspector I can see the error.</p> <p><a href="https://i.stack.imgur.com/QVdgf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QVdgf.png" alt="enter image description here"></a></p> <p>Following are the TS file of my project. </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, OnInit, OnDestroy } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { ParcelsService } from './parcels.service'; import { SafeResourceUrl, DomSanitizationService } from '@angular/platform-browser'; import { Parcel } from './mock-parcels'; @Component({ template: ` &lt;h2&gt;Parcels&lt;/h2&gt; &lt;div *ngIf="parcel"&gt; &lt;h3&gt;"{{parcel.checkUrl}}"&lt;/h3&gt; &lt;iframe width=800 height=500 src="{{safeUrl}}}"&gt;&lt;/iframe&gt; &lt;p&gt; &lt;button (click)="gotoHeroes()"&gt;Back&lt;/button&gt; &lt;/p&gt; &lt;/div&gt; `, providers:[ParcelsService, DomSanitizationService] }) export class HeroDetailComponent implements OnInit, OnDestroy { parcel: Parcel; safeUrl : SafeResourceUrl; private sub: any; constructor( private route: ActivatedRoute, private router: Router, private service: ParcelsService, private sanitizer: DomSanitizationService) {} ngOnInit() { this.sub = this.route.params.subscribe(params =&gt; { let id = +params['id']; // (+) converts string 'id' to a number this.parcel = this.service.getParcel(id); }); this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.parcel.checkUrl); } ngOnDestroy() { this.sub.unsubscribe(); } gotoHeroes() { this.router.navigate(['/heroes']); } }</code></pre> </div> </div> </p> <p>Has anyone ever come across similar issue? Please help to find what I have done wrong.</p> <p>Thanks</p>