(SystemJS) XHR error @angular/commobundles/common.umd.js/http not found

与世无争的帅哥 提交于 2019-12-01 18:50:01

I suspect you should add the following keys to your systemjs configuration:

 map: {
  ...
  '@angular/common/http': 'npm:@angular/common/bundles/common-http.umd.js',
  'tslib': 'npm:tslib/tslib.js'

Plunker Example

tslib is required because @angular/common/http depends on it. https://github.com/angular/common-builds/blob/4.3.0/bundles/common-http.umd.js#L7

You should add map in systemjs configuration @angular/common/http

'@angular/common/http': 'node_modules/@angular/common/bundles/common-http.umd.js'

Additionally It requires tslib

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