diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 365b334..d5eeaeb 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -5,7 +5,7 @@ const routes: Routes = [
{ path: '', loadChildren: './pages/pages.module#PagesModule' },
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
{ path: 'errors', loadChildren: './pages/errors/errors-page.module#ErrorsPageModule' },
- { path: '**', redirectTo: 'errors/404' }
+ // { path: '**', redirectTo: 'errors/404' }
];
@NgModule({
diff --git a/src/app/packages/target/component/list/list.component.html b/src/app/packages/target/component/list/list.component.html
new file mode 100644
index 0000000..2c78552
--- /dev/null
+++ b/src/app/packages/target/component/list/list.component.html
@@ -0,0 +1,3 @@
+
+ list works!
+
diff --git a/src/app/pages/targets/targets.component.scss b/src/app/packages/target/component/list/list.component.scss
similarity index 100%
rename from src/app/pages/targets/targets.component.scss
rename to src/app/packages/target/component/list/list.component.scss
diff --git a/src/app/packages/target/component/list/list.component.spec.ts b/src/app/packages/target/component/list/list.component.spec.ts
new file mode 100644
index 0000000..beacd15
--- /dev/null
+++ b/src/app/packages/target/component/list/list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ListComponent } from './list.component';
+
+describe('ListComponent', () => {
+ let component: ListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/packages/target/component/list/list.component.ts b/src/app/packages/target/component/list/list.component.ts
new file mode 100644
index 0000000..fa28354
--- /dev/null
+++ b/src/app/packages/target/component/list/list.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-list',
+ templateUrl: './list.component.html',
+ styleUrls: ['./list.component.scss']
+})
+export class ListComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/src/app/packages/target/target.module.ts b/src/app/packages/target/target.module.ts
new file mode 100644
index 0000000..ca43aa6
--- /dev/null
+++ b/src/app/packages/target/target.module.ts
@@ -0,0 +1,14 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ListComponent } from 'app/packages/target/component/list/list.component';
+
+@NgModule({
+ imports: [
+ CommonModule
+ ],
+ declarations: [ListComponent],
+ exports: [
+ ListComponent
+ ]
+})
+export class TargetModule { }
diff --git a/src/app/pages/probe/probe-page-routing.module.ts b/src/app/pages/probe/probe-page-routing.module.ts
index 872216e..7d1856d 100644
--- a/src/app/pages/probe/probe-page-routing.module.ts
+++ b/src/app/pages/probe/probe-page-routing.module.ts
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ProbePageComponent } from './probe-page.component';
import { DetailComponent as ProbeDetailComponent } from 'app/packages/probe/component/detail/detail.component';
+import { ListComponent as TargetListComponent } from 'app/packages/target/component/list/list.component';
const routes: Routes = [
{
@@ -9,7 +10,7 @@ const routes: Routes = [
component: ProbePageComponent,
children: [
{ path: ':id', component: ProbeDetailComponent },
- { path: ':id/target', component: ProbeDetailComponent },
+ { path: ':id/targets', loadChildren: 'app/pages/targets/targets-page.module#TargetsPageModule'},
{ path: ':id/history', component: ProbeDetailComponent },
]
}
diff --git a/src/app/pages/probe/probe-page.component.ts b/src/app/pages/probe/probe-page.component.ts
index 131a15a..ca18f27 100644
--- a/src/app/pages/probe/probe-page.component.ts
+++ b/src/app/pages/probe/probe-page.component.ts
@@ -16,8 +16,8 @@ export class ProbePageComponent implements OnInit {
ngOnInit() {
this.tabs = [
{ label: 'Info', path: this.router.url },
- { label: 'Targets', path: '/target' },
- { label: 'History', path: '/probe/history' },
+ { label: 'Targets', path: this.router.url + '/targets' },
+ { label: 'History', path: this.router.url + '/history' },
];
}
diff --git a/src/app/pages/targets/targets-page-routing.module.ts b/src/app/pages/targets/targets-page-routing.module.ts
new file mode 100644
index 0000000..12cef22
--- /dev/null
+++ b/src/app/pages/targets/targets-page-routing.module.ts
@@ -0,0 +1,18 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ListComponent as ProbeListComponent } from 'app/packages/probe/component/list/list.component';
+import { TargetsPageComponent } from 'app/pages/targets/targets-page.component';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: TargetsPageComponent,
+ }
+];
+
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class TargetsPageRoutingModule { }
diff --git a/src/app/pages/targets/targets-page.component.html b/src/app/pages/targets/targets-page.component.html
new file mode 100644
index 0000000..c827d68
--- /dev/null
+++ b/src/app/pages/targets/targets-page.component.html
@@ -0,0 +1,3 @@
+
+ target page
+
\ No newline at end of file
diff --git a/src/app/pages/targets/targets-page.component.scss b/src/app/pages/targets/targets-page.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/targets/targets.component.spec.ts b/src/app/pages/targets/targets-page.component.spec.ts
similarity index 59%
rename from src/app/pages/targets/targets.component.spec.ts
rename to src/app/pages/targets/targets-page.component.spec.ts
index 71dcf85..931ca6d 100644
--- a/src/app/pages/targets/targets.component.spec.ts
+++ b/src/app/pages/targets/targets-page.component.spec.ts
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { TargetsComponent } from './targets.component';
+import { TargetsPageComponent } from './targets-page.component';
describe('TargetsComponent', () => {
- let component: TargetsComponent;
- let fixture: ComponentFixture;
+ let component: TargetsPageComponent;
+ let fixture: ComponentFixture;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ TargetsComponent ]
+ declarations: [ TargetsPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(TargetsComponent);
+ fixture = TestBed.createComponent(TargetsPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/pages/targets/targets-page.component.ts b/src/app/pages/targets/targets-page.component.ts
new file mode 100644
index 0000000..a9984d8
--- /dev/null
+++ b/src/app/pages/targets/targets-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'of-pages-targets',
+ templateUrl: './targets-page.component.html',
+ styleUrls: ['./targets-page.component.scss']
+})
+export class TargetsPageComponent implements OnInit {
+
+ constructor() {
+ }
+
+ ngOnInit() {
+ }
+}
diff --git a/src/app/pages/targets/targets-page.module.ts b/src/app/pages/targets/targets-page.module.ts
new file mode 100644
index 0000000..6648c2b
--- /dev/null
+++ b/src/app/pages/targets/targets-page.module.ts
@@ -0,0 +1,19 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { MaterialModule } from 'app/commons/ui/material/material.module';
+import { SubMenubarModule } from 'app/commons/component/sub-menubar/sub-menubar.module';
+import { TargetsPageComponent } from 'app/pages/targets/targets-page.component';
+import { TargetModule } from 'app/packages/target/target.module';
+import { TargetsPageRoutingModule } from 'app/pages/targets/targets-page-routing.module';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ MaterialModule,
+ TargetsPageRoutingModule
+ ],
+ declarations: [
+ TargetsPageComponent
+ ]
+})
+export class TargetsPageModule { }
diff --git a/src/app/pages/targets/targets.component.html b/src/app/pages/targets/targets.component.html
deleted file mode 100644
index ade25ff..0000000
--- a/src/app/pages/targets/targets.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- targets works!
-
diff --git a/src/app/pages/targets/targets.component.ts b/src/app/pages/targets/targets.component.ts
deleted file mode 100644
index 988ef85..0000000
--- a/src/app/pages/targets/targets.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'of-targets',
- templateUrl: './targets.component.html',
- styleUrls: ['./targets.component.scss']
-})
-export class TargetsComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}