Angular 构建后的路由
Angular routing after ng build
当我访问此地址时出现错误:“无法获取 /main”:“http://localhost/main”
我在 ng build
之后附上了我的代码图片
我将 ng 构建后创建的文件夹(名为 client)移动到服务器
希望你能帮助我
谢谢my code
我认为您的快速服务器没有重定向到您的 index.html。
你也可以使用哈希路由。
可以在此处找到更多详细信息
你能分享一张 main.component.ts
的照片吗?出现错误是因为找不到Maincomponent
我想这个错误是因为你拼错了 main.components 出口。
当我访问此地址时出现错误:“无法获取 /main”:“http://localhost/main” 我在 ng build
之后附上了我的代码图片我将 ng 构建后创建的文件夹(名为 client)移动到服务器
希望你能帮助我 谢谢my code
我认为您的快速服务器没有重定向到您的 index.html。
你也可以使用哈希路由。
可以在此处找到更多详细信息
你能分享一张 main.component.ts
的照片吗?出现错误是因为找不到Maincomponent
我想这个错误是因为你拼错了 main.components 出口。