为了使用@ngrx/store 2.2.1和@ngrx/core 1.2.0进行状态管理,在我的示例角2.4.0应用程序中,我遵循了以下步骤
3在systemjs.config.js文件的包部分添加了下面的代码
'@ngrx/core': {
main: 'bundles/core.umd.js',
format: 'cjs'
},
'@ngrx/store': {
main: 'bundles/store.umd.js',
format: 'cjs'
} 当我浏览到网站时,我在浏览器控制台中出现以下错误。
加载资源失败:服务器响应状态为404 (未找到) "http://localhost:62818/@ngrx/store/bundles/store.umd.js“
任何需要修改什么来解决这个问题的想法。
发布于 2017-02-10 16:22:52
正如@ estus提到的,这是一个路径问题。将下面的行添加到具有正确路径的映射部分解决了这个问题。
'@ngrx/core': 'node_modules/@ngrx/core/bundles/core.umd.js',
'@ngrx/store': 'node_modules/@ngrx/store/bundles/store.umd.js',https://stackoverflow.com/questions/42162651
复制相似问题