Skip to content

Commit a6ee7a7

Browse files
ByPortrandrianov
authored andcommitted
refactor: index all folders
1 parent d1f108c commit a6ee7a7

File tree

129 files changed

+397
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+397
-286
lines changed

src/app/app-routing.module.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
import { RouterModule } from '@angular/router';
22
import { NgModule } from '@angular/core';
33

4-
import { CommonLayoutComponent } from './layouts/common-layout/common-layout.component';
5-
import { DashboardComponent } from './pages/dashboard/dashboard.component';
6-
import { MapsComponent } from './pages/maps/maps.component';
7-
import { ChartsComponent } from './pages/charts/charts.component';
8-
import { FormsComponent } from './pages/forms/forms.component';
4+
import { CommonLayoutComponent } from './layouts/common-layout';
5+
import { DashboardComponent } from './pages/dashboard';
6+
import { MapsComponent } from './pages/maps';
7+
import { ChartsComponent } from './pages/charts';
8+
import { FormsComponent } from './pages/forms';
9+
import { LayoutsModule } from './layouts';
910

1011
@NgModule({
11-
imports: [RouterModule.forRoot(
12-
[
13-
{ path: '', redirectTo: 'app', pathMatch: 'full' },
14-
{ path: 'app', component: CommonLayoutComponent, children: [
15-
{ path: 'dashboard', component: DashboardComponent, pathMatch: 'full' },
16-
{ path: 'forms', component: FormsComponent, pathMatch: 'full' },
17-
{ path: 'maps', component: MapsComponent, pathMatch: 'full' },
18-
{ path: 'charts', component: ChartsComponent, pathMatch: 'full' },
12+
imports: [
13+
RouterModule.forRoot(
14+
[
15+
{ path: '', redirectTo: 'app/dashboard', pathMatch: 'full' },
16+
{ path: 'app', component: CommonLayoutComponent, children: [
17+
{ path: 'dashboard', component: DashboardComponent, pathMatch: 'full' },
18+
{ path: 'forms', component: FormsComponent, pathMatch: 'full' },
19+
{ path: 'maps', component: MapsComponent, pathMatch: 'full' },
20+
{ path: 'charts', component: ChartsComponent, pathMatch: 'full' },
21+
{ path: '**', redirectTo: '/pages/404' },
22+
] },
23+
{ path: 'ui', loadChildren: './pages/ui/ui.module#UIModule' },
24+
{ path: 'pages', loadChildren: './pages/pages/pages.module#PagesModule' },
1925
{ path: '**', redirectTo: '/pages/404' },
20-
] },
21-
{ path: 'ui', loadChildren: './pages/ui/ui.module#UIModule' },
22-
{ path: 'pages', loadChildren: './pages/pages/pages.module#PagesModule' },
23-
{ path: '**', redirectTo: 'pages/404' },
24-
],
25-
{ useHash: true },
26-
)],
26+
],
27+
{ useHash: true },
28+
),
29+
LayoutsModule,
30+
],
2731
exports: [RouterModule],
2832
})
2933
export class AppRoutingModule { }

src/app/app.module.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@ import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33

44
import { AppRoutingModule } from './app-routing.module';
5-
65
import { AppComponent } from './app.component';
7-
import { MapsModule } from './pages/maps/maps.module';
8-
import { DashboardModule } from './pages/dashboard/dashboard.module';
9-
import { ChartsModule } from './pages/charts/charts.module';
10-
import { FormsModule } from './pages/forms/forms.module';
11-
import { LayoutsModule } from './layouts/layouts.module';
6+
import { MapsModule } from './pages/maps';
7+
import { DashboardModule } from './pages/dashboard';
8+
import { ChartsModule } from './pages/charts';
9+
import { FormsModule } from './pages/forms';
1210

1311
@NgModule({
1412
declarations: [AppComponent],
1513
imports: [
1614
BrowserModule,
1715
AppRoutingModule,
18-
LayoutsModule,
1916
DashboardModule,
2017
FormsModule,
2118
MapsModule,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { SidebarComponent } from './sidebar.component';

src/app/components/sidebar/sidebar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Input } from '@angular/core';
22

3-
import { BaseSidebarComponent } from 'theme/components/sidebar/sidebar.component';
3+
import { SidebarComponent as BaseSidebarComponent } from 'theme/components/sidebar';
44

55
@Component({
66
selector: 'app-sidebar',

src/app/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { AppComponent } from './app.component';
2+
export { AppModule } from './app.module';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { BlankLayoutComponent } from './blank-layout.component';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { CommonLayoutComponent } from './common-layout.component';

src/app/layouts/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { LayoutsModule } from './layouts.module';

src/app/layouts/layouts.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule } from '@angular/router';
44

5-
import { CommonLayoutComponent } from './common-layout/common-layout.component';
6-
import { BlankLayoutComponent } from './blank-layout/blank-layout.component';
7-
import { ThemeModule } from 'theme/theme.module';
8-
import { SidebarComponent } from 'app/components/sidebar/sidebar.component';
5+
import { CommonLayoutComponent } from './common-layout';
6+
import { BlankLayoutComponent } from './blank-layout';
7+
import { ThemeModule } from 'theme';
8+
import { SidebarComponent } from 'app/components/sidebar';
99

1010
@NgModule({
1111
imports: [

src/app/pages/charts/browser-statistics-chart/browser-statistics-chart.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { FormsModule } from '@angular/forms';
44

5-
import { ThemeModule } from 'theme/theme.module';
5+
import { ThemeModule } from 'theme';
66

77
import { BrowserStatisticsChartDirective } from './browser-statistics-chart.directive';
88
import { BrowserStatisticsChartService } from './browser-statistics-chart.service';

0 commit comments

Comments
 (0)