我已成功升级了一个空项目,以便按照this article使用Angular 5。我没有使用IIS
部分,因为我正在使用IIS Express
进行本地测试。
但是,当我启动应用时,我只看到页面中的文字Loading...
而没有别的。
文章说我需要改变这个:
<app asp-prerender-module="ClientApp/dist/main-server">Loading...</app>
使用:
<app>Loading...</app>
Views/Home/Index.cshtml
中的。
这是对的吗?问题可能在其他地方吗?
修改
我在Chrome中收到以下错误:
未捕获错误:找不到模块“@ angular / common / http” 在对象。 (主client.jsv = SR1R2f9X17xMnMEfwymdHMp2ZbAGWFRSTzfxf80cmgg:1394) 在 webpack_require (bootstrap cecf12e96da858d1e568:19) at Object.hasOwn(css-base.js:76) 在 webpack_require (bootstrap cecf12e96da858d1e568:19) 在对象。 (navmenu.component.ts:8) 在 webpack_require (bootstrap cecf12e96da858d1e568:19) 在module.exports(bootstrap cecf12e96da858d1e568:65) 在bootstrap cecf12e96da858d1e568:65
执行npm install
时出现以下错误:
22821详细堆栈错误:AboFlex@0.0.0 postinstall:
webpack --config webpack.config.vendor.js
22821详细堆栈退出状态1 eventEmitter上的22821详细堆栈。 (C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ index.js:285:16) EventEmitter.emit上的22821详细堆栈(events.js:182:13) 子进程22821详细堆栈。 (C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ lib \ spawn.js:55:14) ChildProcess.emit上的22821详细堆栈(events.js:182:13) 在maybeClose上的22821详细堆栈(internal / child_process.js:947:16) Process.ChildProcess._handle.onexit(internal / child_process.js:236:5)中的22821详细堆栈