尝试启动时缺少Angular 2 domsanitizer [英] angular 2 missing domsanitizer when try to start
问题描述
im运行angular2 rc 5一切正常,直到im重新启动我的电脑并再次执行npm启动,然后再重新启动pc一切正常
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'
我已经尝试重新安装软件包,并从另一个可以正常运行的快速入门中复制@angular文件,但仍然失败,并出现相同的错误
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
我猜我的@ angular/platform-browser出了点问题,但我仍然无法弄清楚
i guess its something wrong with my @angular/platform-browser but i still cant figure it out
推荐答案
如果您使用的是angular2 RC5 ,请使用此-
If you are using angular2 RC5 use this-
- DomSanitizationService
如果您要移至angular2 RC6 ,请使用此-
If you are moving to angular2 RC6 use this-
- DomSanitizer
参考: https://github.com/angular/angular/pull/11085
看看这是否有帮助.
这篇关于尝试启动时缺少Angular 2 domsanitizer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!