Skip to content

Commit 41e8d92

Browse files
committed
refactor: moved to separate folders
1 parent d1647a5 commit 41e8d92

13 files changed

+53
-107
lines changed

src/app/_nav.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,22 @@ export const navItems = [
190190
children: [
191191
{
192192
name: 'Login',
193-
url: '/pages/login',
193+
url: '/login',
194194
icon: 'icon-star'
195195
},
196196
{
197197
name: 'Register',
198-
url: '/pages/register',
198+
url: '/register',
199199
icon: 'icon-star'
200200
},
201201
{
202202
name: 'Error 404',
203-
url: '/pages/404',
203+
url: '/404',
204204
icon: 'icon-star'
205205
},
206206
{
207207
name: 'Error 500',
208-
url: '/pages/500',
208+
url: '/500',
209209
icon: 'icon-star'
210210
}
211211
]

src/app/app.module.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
1313
import { AppComponent } from './app.component';
1414

1515
// Import containers
16-
import {
17-
FullLayoutComponent,
18-
SimpleLayoutComponent
19-
} from './containers';
16+
import { DefaultLayoutComponent } from './containers';
17+
18+
import { P404Component } from './views/error/404.component';
19+
import { P500Component } from './views/error/500.component';
20+
import { LoginComponent } from './views/login/login.component';
21+
import { RegisterComponent } from './views/register/register.component';
2022

2123
const APP_CONTAINERS = [
22-
FullLayoutComponent,
23-
SimpleLayoutComponent
24-
]
24+
DefaultLayoutComponent
25+
];
2526

2627
import {
2728
AppAsideModule,
@@ -43,13 +44,11 @@ import { ChartsModule } from 'ng2-charts/ng2-charts';
4344
imports: [
4445
BrowserModule,
4546
AppRoutingModule,
46-
4747
AppAsideModule,
4848
AppBreadcrumbModule.forRoot(),
4949
AppFooterModule,
5050
AppHeaderModule,
5151
AppSidebarModule,
52-
5352
PerfectScrollbarModule,
5453
BsDropdownModule.forRoot(),
5554
TabsModule.forRoot(),
@@ -58,6 +57,10 @@ import { ChartsModule } from 'ng2-charts/ng2-charts';
5857
declarations: [
5958
AppComponent,
6059
...APP_CONTAINERS,
60+
P404Component,
61+
P500Component,
62+
LoginComponent,
63+
RegisterComponent
6164
],
6265
providers: [{
6366
provide: LocationStrategy,

src/app/app.routing.ts

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,50 @@ import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

44
// Import Containers
5-
import {
6-
FullLayoutComponent,
7-
SimpleLayoutComponent
8-
} from './containers';
5+
import { DefaultLayoutComponent } from './containers';
6+
7+
import { P404Component } from './views/error/404.component';
8+
import { P500Component } from './views/error/500.component';
9+
import { LoginComponent } from './views/login/login.component';
10+
import { RegisterComponent } from './views/register/register.component';
911

1012
export const routes: Routes = [
1113
{
1214
path: '',
1315
redirectTo: 'dashboard',
1416
pathMatch: 'full',
1517
},
18+
{
19+
path: '404',
20+
component: P404Component,
21+
data: {
22+
title: 'Page 404'
23+
}
24+
},
25+
{
26+
path: '500',
27+
component: P500Component,
28+
data: {
29+
title: 'Page 500'
30+
}
31+
},
32+
{
33+
path: 'login',
34+
component: LoginComponent,
35+
data: {
36+
title: 'Login Page'
37+
}
38+
},
39+
{
40+
path: 'register',
41+
component: RegisterComponent,
42+
data: {
43+
title: 'Register Page'
44+
}
45+
},
1646
{
1747
path: '',
18-
component: FullLayoutComponent,
48+
component: DefaultLayoutComponent,
1949
data: {
2050
title: 'Home'
2151
},
@@ -53,19 +83,6 @@ export const routes: Routes = [
5383
loadChildren: './views/widgets/widgets.module#WidgetsModule'
5484
}
5585
]
56-
},
57-
{
58-
path: 'pages',
59-
component: SimpleLayoutComponent,
60-
data: {
61-
title: 'Pages'
62-
},
63-
children: [
64-
{
65-
path: '',
66-
loadChildren: './views/pages/pages.module#PagesModule',
67-
}
68-
]
6986
}
7087
];
7188

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4+
selector: 'app-dashboard',
45
templateUrl: 'login.component.html'
56
})
6-
export class LoginComponent {
7-
8-
constructor() { }
9-
10-
}
7+
export class LoginComponent { }

src/app/views/pages/pages-routing.module.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)