angular 2 missing domsanitizer when try to start

时间秒杀一切 提交于 2019-12-05 23:14:48

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/39462067/angular-2-missing-domsanitizer-when-try-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!