angular 2 missing domsanitizer when try to start
Asked Answered
F

1

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

Fustic answered 13/9, 2016 at 4:7 Comment(2)
can you share your code?Gulf
in the index file?Fustic
G
37

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.

Gulf answered 13/9, 2016 at 4:20 Comment(5)
where should i change?, i never use that service anywhereFustic
If you share your component code where you are using DomSanitizer then I may be able to help youGulf
As I mentioned in my answer, if you are using RC5 import DomSanitizationService like this - import { DomSanitizationService } from '@angular/platform-browser';Gulf
sorry its my mistake my problem is im using primeng there is domsanitizer there thats why its error, thankss alotFustic
How did you fix the error. I am facing the error on Primng as wellLanguor

© 2022 - 2024 — McMap. All rights reserved.