【发布时间】:2017-11-10 22:20:57
【问题描述】:
我有一个托管在 S3 上的 Angular 2 应用程序。路由文件如下所示。
const APP_ROUTES: Routes = [
{ path: 'checkout', component: CheckoutComponent },
{ path: 'thankyou', component: ThankyouComponent },
{ path: 'lander', component: LanderComponent },
{ path: '', component: LanderComponent }
];
如果用户输入www.example.com/checkout,我希望它将他们带到应用程序上的checkout 路线。我认为它会这样做,但 S3 给了我错误没有这样的密钥。有没有办法在 Angular 2 中做到这一点,还是我需要在 S3 中设置?我认为问题在于 S3 将转到 example.com 存储桶,然后期待一个文件夹 checkout。我怎么会让它不这样做,而只是应用程序以及 URL 之后指定的任何路由?
【问题讨论】:
标签: angular