最初にアプリケーションをロードした後、ブラウザの戻るボタンをクリックすると、ブラウザのルートURLは#に変わり、ブランク。私は、ブラウザの戻るボタンを押してデフォルトのビューにリダイレクトしたいと思います。提案?空白のコンテンツブラウザの戻るボタンをクリックしているとき(私の角2のアプリケーションでルーティングの問題)
ルーティングページコード。
export var DynaRoutes: Routes = [
{
path: '',
component: DynaMainView,
children: [
{
path: 'reports',
data: {
text: 'Reports',
name: 'Reports',
image: './app/assets/img/icons/reports.svg',
iconId: 'formModeling',
},
children: [
{
path: '',
component: DynaReportsView
}
]
},
{
path: 'analyze',
data: {
text: 'Analyze',
name: 'Analyze',
image: './app/assets/img/icons/analyze.svg',
iconId: 'screenModeling'
},
children: [
{
path: '',
component: DynaAnalyzerView,
}
]
},
{
path: 'updates',
data: {
text: 'Updates',
name: 'Updates',
image: './app/assets/img/icons/analyze.svg',
iconId: 'screenModeling',
disabled: true
},
children: [
{
path: '',
component: DynaUpdatesView
}
]
}
]
}
];
私はそれを試みました。しかし、それは動作していませんでした。 –