【发布时间】:2017-05-18 22:15:56
【问题描述】:
因此,在我运行它时构建了我的电子 Angular 2 应用程序后,我的 Angular 2 应用程序不再工作了。没有错误出现,但应用程序不再知道如何路由,所以它只是根据我的 index.html 卡在加载中。这与 asar 打包我的应用程序的方式有关吗?我该怎么做才能让它再次运行? 文件结构:
./package.json
----->./electron/main.js
src/---> index.html
app/app.routing.ts
app/app.component.ts
app/app.module.ts
app/home/home.component.ts
app/...All The other components......
index.html:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>New</title>
<script>
document.write('<base href="' + document.location + '" />');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script>window.$ = window.jQuery = require('./public/jquery/dist/jquery.min.js');</script>
<script src="./public/bootstrap/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./public/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./public/bootstrap/dist/css/bootstrap-theme.min.css">
</head>
<body>
<app-root>
Loading...
</app-root>
</body>
</html>
【问题讨论】: