Visual studio 2015 将angular2应用程序从VS2015移动到glassfish

Visual studio 2015 将angular2应用程序从VS2015移动到glassfish,visual-studio-2015,glassfish,angular,config,systemjs,Visual Studio 2015,Glassfish,Angular,Config,Systemjs,我在SystemJS配置方面遇到问题 我在VS2015(asp.net core 1.0)中有一个可运行的angular2应用程序。我可以编译.ts文件并进行更改,不会发生错误 我现在想将该应用程序移动到glassfish 4.1 web项目中(充当生产服务器),但当我移动整个wwwroot内容时 (所有的.js)从VS2015到glassfish web文件夹,我看到了大量的404 以下是我在VS2015中使用的Index.html文件: <!DOCTYPE html> <h

我在SystemJS配置方面遇到问题

我在VS2015(asp.net core 1.0)中有一个可运行的angular2应用程序。我可以编译.ts文件并进行更改,不会发生错误

我现在想将该应用程序移动到glassfish 4.1 web项目中(充当生产服务器),但当我移动整个wwwroot内容时 (所有的.js)从VS2015到glassfish web文件夹,我看到了大量的404

以下是我在VS2015中使用的Index.html文件:

<!DOCTYPE html>
<html>
<head>
    <base href="/">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" href="data:;base64,iVBORwOKGO=" />
    <title>Procurement v1.0</title>
    <link src="libs/css/bootstrap.min.css" rel="stylesheet" />
    <link href="libs/css/case1.css" rel="stylesheet" />
    <!-- 1. Load libraries -->
    <script src="libs/es6-shim.min.js"></script>
    <script src="libs/system-polyfills.js"></script>
    <script src="libs/angular2-polyfills.js"></script>
    <script src="libs/system.js"></script>
    <script src="libs/Rx.js"></script>
    <script src="libs/angular2.dev.js"></script>
    <script src="libs/router.dev.js"></script>
    <script src="libs/http.dev.js"></script>
    <script src="libs/jquery.js"></script>
    <script src="libs/bootstrap.js"></script>
    <!-- 2. Configure SystemJS -->
    <script>
        System.config({
            packages: {
                appScripts: {
                    defaultExtension: 'js'
                },
                '@ngrx/store': {
                    main: 'index.js',
                    format: 'cjs'
                }
            },
            map: {
                '@ngrx/store': 'libs/storedist'
            }
        });
    </script>
    <script> 
        System.import('appScripts/app')
              .then(null, console.error.bind(console));
    </script>
</head>
<body>
    <router-app>Loading...</router-app>
</body>
</html>

由于我是这方面的新手,我想知道是否有更简单的方法来移植这个应用程序,或者修复配置。任何洞察都将不胜感激。

经过几个小时的修补,我发现它是

<base href="/"> 

把我搞砸的标签。删除后,该应用程序现在部分工作,但我仍然得到404的html模板和img文件现在。我会进一步调查的

Navigated to http://localhost:8080/APPOCase1a/
system.src.js:4597 GET http://localhost:8080/APPOCase1a/appScripts/product/product-home.component 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
system.src.js:4597 GET http://localhost:8080/APPOCase1a/appScripts/home/home.component 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
system.src.js:4597 GET http://localhost:8080/APPOCase1a/appScripts/po/po-generator-home.component 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
system.src.js:4597 GET http://localhost:8080/APPOCase1a/appScripts/vendor/vendor-home.component 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
system.src.js:4597 GET http://localhost:8080/APPOCase1a/appScripts/store/reducers 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
angular2-polyfills.js:332 Error: XHR error (404 Not Found) loading http://localhost:8080/APPOCase1a/appScripts/product/product-home.component(…)ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
system.src.js:4597 GET http://localhost:8080/libs/storedist/index.js 404 (Not Found)I @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneAwarePromise @ angular2-polyfills.js:589(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597(anonymous function) @ system.src.js:4597ZoneDelegate.invoke @ angular2-polyfills.js:332Zone.run @ angular2-polyfills.js:227(anonymous function) @ angular2-polyfills.js:576ZoneDelegate.invokeTask @ angular2-polyfills.js:365Zone.runTask @ angular2-polyfills.js:263drainMicroTaskQueue @ angular2-polyfills.js:482ZoneTask.invoke @ angular2-polyfills.js:434
<base href="/">