Angular2之 buglist

官网API:https://docs.angularjs.org/api
官网 docs: https://angular.io/docs
对应的中文文档https://angular.cn/docs
buglist 1.cant find module @angular/animations/brower

$ npm install @angular/animations@latest –save
2.”/animations/browser”’ has no exported member ‘?DomAnimationEngine’
BrowserAnimationModule模块的版本问题,@angular/animations 4.1.3没有问题(这里也不是很固定,打开 package.json和其他版本匹配起来就好)
$ npm install @angular/animations@4.1.3 –save
3.Error: No provider for InjectionToken DocumentToken!
4. cant find module @angular/common/http
只需要重新安装@angular/common即可,即:
$ npm install –save @angular/common
【Angular2之 buglist】5.跨域请求问题:
Cross-origin redirection to ** denied by Cross-Origin Resource Sharing policy: Origin http://localhost:8101 is not allowed by Access-Control-Allow-Origin.
6. Failed to load resource: Preflight response is not successful
Angular2之 buglist
文章图片

7.Property ‘toPromise’ does not exist on type ‘Observable’.
解决方法:
在文件中导入:
import 'rxjs/add/operator/toPromise';

    推荐阅读