Tree 无法使用SystemJS.config.js加载ng2树
我正在使用Angular6。已安装ng2-tree。但是,当我尝试加载相同内容时,出现以下错误-Tree 无法使用SystemJS.config.js加载ng2树,tree,angular5,systemjs,Tree,Angular5,Systemjs,我正在使用Angular6。已安装ng2-tree。但是,当我尝试加载相同内容时,出现以下错误- fetch.js:32 GET http://127.0.0.1:8080/uuid/v4 404 (Not Found) (index):23 Error: Fetch error: 404 Not Found Instantiating http://127.0.0.1:8080/uuid/v4 Loading http://127.0.0.1:8080/node_modules/
fetch.js:32 GET http://127.0.0.1:8080/uuid/v4 404 (Not Found)
(index):23 Error: Fetch error: 404 Not Found
Instantiating http://127.0.0.1:8080/uuid/v4
Loading http://127.0.0.1:8080/node_modules/ng2-tree/src/tree.js
Loading dist/main.js
at fetch.js:37
Configurations -
systemjs.config.js :
map: {
"ng2-tree" : 'npm:ng2-tree',
///bundles/ng2-tree.umd.min.js
},
packages: {
'ng2-tree' : {main: 'index.js', defaultExtension: 'js'},
}
Component :
import { TreeModel , TreeComponent , NodeEvent,TreeModelSettings } from 'ng2-tree';
有人能建议需要做什么吗?
我需要更新配置文件吗???您需要如下设置配置文件:
System.config({
map: {
'ng2-tree': 'npm:ng2-tree/bundles/ng2-tree.umd.min.js',
}
}