angular 2 missing domsanitizer when try to start

Rommy picture Rommy · Sep 13, 2016 · Viewed 10.2k times · Source

im running angular2 rc 5 all doing fine until im restart my pc and doing npm start again, before restart pc everything working fine

when im try to start my project again there is an error saying that ,

node_modules/@angular/platform-browser/index has no exported member 'DomSanitizer'

im already try to reinstall the package and copy paste the @angular file from another quickstart that working but still fail with the same error

i guess its something wrong with my @angular/platform-browser but i still cant figure it out

Answer

Sanket picture Sanket · Sep 13, 2016

If you are using angular2 RC5 use this-

  • DomSanitizationService

If you are moving to angular2 RC6 use this-

  • DomSanitizer

Reference: https://github.com/angular/angular/pull/11085

See if this helps.