9

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

All Іѕ Vаиітy
  • 24,861
  • 16
  • 87
  • 111
Rommy
  • 447
  • 3
  • 10
  • 23

1 Answers1

36

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.

Sanket
  • 19,295
  • 10
  • 71
  • 82
  • 1
    where should i change?, i never use that service anywhere – Rommy Sep 13 '16 at 07:25
  • If you share your component code where you are using **DomSanitizer** then I may be able to help you – Sanket Sep 13 '16 at 07:56
  • As I mentioned in my answer, if you are using RC5 import DomSanitizationService like this - `import { DomSanitizationService } from '@angular/platform-browser';` – Sanket Sep 13 '16 at 08:08
  • sorry its my mistake my problem is im using primeng there is domsanitizer there thats why its error, thankss alot – Rommy Sep 13 '16 at 08:19
  • How did you fix the error. I am facing the error on Primng as well – Sacky San Sep 26 '16 at 09:51