target router

This commit is contained in:
insanity 2018-06-05 19:05:23 +09:00
parent e5ae41121e
commit c1e14fd816
11 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import { ProbeTabPageComponent } from './probe-tab-page.component';
import { ProbeListPageComponent } from '@app/pages/probes/probe/probe-list-page.component';
import { ProbeDetailPageComponent } from '@app/pages/probes/probe/probe-detail-page.component';
import { NoAuthProbePageComponent } from '@app/pages/probes/noauth-probe/noauth-probe-page.component';
import { ProbeDownloadPageComponent } from '@app/pages/probes/download/download-page.component';
import { ProbeDownloadPageComponent } from '../../pages/probes/download/download-page.component';
const routes: Routes = [
{
@ -16,12 +16,14 @@ const routes: Routes = [
{ path: 'download', component: ProbeDownloadPageComponent },
{ path: 'download/:idx', component: ProbeDownloadPageComponent },
{ path: ':id/info', component: ProbeDetailPageComponent },
{ path: ':id/target', loadChildren: '../../pages/targets/target-page.module#TargetPageModule' },
{ path: ':id/history', component: null },
{ path: 'target', loadChildren: '../pages/target/target-page.module#TargetPageModule'},
]
},
];
// D:\project\overFlow\member_webapp\src\app\pages\targets\target-page.module.ts
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]

View File

@ -41,8 +41,7 @@ export class ProbeTabPageComponent implements OnDestroy {
default:
this.tabs = [
{ label: 'INFO', routerLink: ['/probe/', parsedUrl, 'info'] },
// { label: 'TARGETS', path: ['/probe/', parsedUrl, 'target'] },
{ label: 'TARGETS', routerLink: ['/target/list'], queryParams: {probe: parsedUrl}},
{ label: 'TARGETS', routerLink: ['/probe/', parsedUrl, 'target'] },
{ label: 'HISTORY', path: ['/probe/', parsedUrl, 'history'], disabled: true },
];
break;