www.myweb.com/something にアクセスすると、Web に次のメッセージが表示されます。
{
"status": 404,
"message": "No Content"
}
ここに私の app.routes があります:
export const routes: RouterConfig = [
{ path: '', redirectTo: 'account', pathMatch: 'full' },
{ path: 'account', component: Account },
{ path: 'followers', component: Followers },
{ path: 'explore/:id', component: Explore },
{ path: '**', redirectTo: 'account' },
];
私はAngular Universalを使用しているので、server.tsと呼ばれる別のファイルがあります。このコードは次のとおりです。
// Routes with html5pushstate
// ensure routes match client-side-app
app.get('/', ngApp);
app.get('/followers', ngApp);
app.get('/followers/*', ngApp);
app.get('/account', ngApp);
app.get('/account/*', ngApp);
app.get('/explore', ngApp);
app.get('/explore/*', ngApp);
問題はどこだ?ありがとう!