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/[email protected] –save

3.Error: No provider for InjectionToken DocumentToken!
4. cant find module @angular/common/http
只需要重新安装@angular/common即可,即:

$ npm install –save @angular/common

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
这里写图片描述
7.Property ‘toPromise’ does not exist on type ‘Observable’.
解决方法:
在文件中导入:

import 'rxjs/add/operator/toPromise';

你可能感兴趣的:(angularjs)