我创建了一个 ubuntu
的实例服务器在 AWS
.除了我不完全理解的两件事之外,一切都很好。
当您转到 my web app 时你必须只对
buttons
进行操作例如在菜单中。你不能发出类似'mypage/items'
的请求因为它抛出HTTP 404 Error
.但是,如果您转到名为Home
的书签你应该注意到它添加到url
后缀/items
.但在我的app.module
每条路线都已定义:`RouterModule.forRoot([ { path: 'items', component: ItemListComponent}, { path: 'guide', component: GuideComponent}, { path: 'history', component: HistoryComponent}, { path: 'sign-up', component: SignUpComponent}, { path: 'login', component: LoginComponent}, { path: '', component: ItemListComponent} ])`
<ul class="nav navbar-nav"> <li routerLinkActive="active current"><a routerLink="/items">Home</a></li> <li routerLinkActive="active current"><a routerLink="/guide">Poradnik</a></li> <li routerLinkActive="active current"><a routerLink="/history">Historia</a></li> </ul>
你能给我一些提示吗,我怎样才能制作我的
table
这是在Home
书签响应?当您切换到移动设备模式时,它不喜欢 goot。
最佳答案
您需要向网络服务器提供配置,以将您的所有请求重定向到您的网络应用程序的 index.html。请使用以下链接供您引用: https://angular.io/guide/deployment
关于css - 具有路由和响应模式的 Angular 4 案例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46867464/