0
A
回答
1
確保您systemjs配置保存了所有你映射正確
下面是一個systemjs CONFI持有不同angular2模塊作爲單獨的
modules and loads from different folders
(function (global) {
System.config({
defaultExtension: 'js',
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'src',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
'ng2-pagination': 'npm:ng2-pagination/dist/ng2-pagination-bundle.js',
//private modules
'local': 'local/',
'candi-services': 'npm:candi-services',
'candi-loader': 'npm:candi-loader',
'candi-global-search': 'npm:candi-global-search'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
defaultExtension: 'js',
app: {
main: 'app/main.js',
defaultExtension: 'js'
},
local: {
main: 'main.js',
defaultExtension: 'js'
},
'candi-loader' : {
main: './index.js',
defaultExtension: 'js'
},
'candi-services' : {
main: './index.js',
defaultExtension: 'js'
},
'candi-global-search' : {
main: './index.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
'angular-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
}
}
});
})(this);
相關問題
- 1. Angular2測試,SystemJS無法加載模塊
- 2. 無法在TypeScript和Systemjs中加載具有擴展js的模塊
- 3. 加載捆綁AMD模塊,SystemJS
- 4. Drush模塊無法下載
- 5. Angular2 AOT編譯懶加載的模塊和systemjs
- 6. 無法加載PowerShell模塊
- 7. Drupal模塊無法加載
- 8. 無法加載Python模塊
- 9. 無法加載模塊
- 10. GWT:無法加載模塊
- 11. 無法加載Coredata模塊
- 12. Imagick無法加載模塊
- 13. 無法加載模塊:CTLS
- 14. 無法更新DBML:指定的模塊無法加載
- 15. 我無法在metasploit中加載新模塊
- 16. 的PostgreSQL無法加載的perl模塊
- 17. 的Apache無法加載的WebLogic模塊
- 18. 當它分成不同的模塊時無法加載路線
- 19. 無法加載定製的Dojo模塊
- 20. 無法加載apache2.4的apache php5模塊
- 21. py2exe無法加載指定的模塊
- 22. 無法下載模塊Prestashop 1.7
- 23. SystemJS和ES模塊導入的相對路徑
- 24. 使用SystemJS/jspm加載異步,生產中的es5模塊
- 25. systemjs - 加載jQuery的
- 26. requirejs - 無法使用相對路徑加載模塊
- 27. Angular 2:MaterialiseCSS模塊無法正確加載路由
- 28. Angular2 RC5延遲加載路由無法找到模塊
- 29. Angular2 RC5路由器無法找到模塊(延遲加載)
- 30. SystemJS無法從webpack軟件包加載scss和css文件
請務必檢查您的文件夾結構 –
systemjs是否瞭解其他模塊,如es6,commonjs等 –
是的。 systemjs loader非常瞭解瀏覽器和nodejs的make模塊系統 –