Skip to content

Commit c39e625

Browse files
committed
agregamos y modifacamos modulos
1 parent 8610e69 commit c39e625

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

src/app/pages/pages.module.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { NgModule } from '@angular/core';
2+
import { SharedModule } from '../shared/shared.module';
3+
import { DashboardComponent } from './dashboard/dashboard.component';
4+
import { ProgressComponent } from './progress/progress.component';
5+
import { Graficas1Component } from './graficas1/graficas1.component';
6+
import { PagesComponent } from './pages.component';
7+
import { PAGES_ROUTES } from './pages.routes';
8+
9+
10+
@NgModule({
11+
declarations: [
12+
PagesComponent,
13+
DashboardComponent,
14+
ProgressComponent,
15+
Graficas1Component
16+
],
17+
exports: [
18+
PagesComponent,
19+
DashboardComponent,
20+
ProgressComponent,
21+
Graficas1Component
22+
],
23+
imports: [
24+
SharedModule,
25+
PAGES_ROUTES
26+
]
27+
})
28+
export class PagesModule {}

src/app/pages/pages.routes.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { RouterModule, Routes } from '@angular/router';
2+
3+
import { PagesComponent } from './pages.component';
4+
import { DashboardComponent } from './dashboard/dashboard.component';
5+
import { ProgressComponent } from './progress/progress.component';
6+
import { Graficas1Component } from './graficas1/graficas1.component';
7+
8+
const pagesRoutes: Routes = [
9+
{
10+
path: '',
11+
component: PagesComponent,
12+
children: [
13+
{ path: 'dashboard', component: DashboardComponent },
14+
{ path: 'progress', component: ProgressComponent },
15+
{ path: 'graficas1', component: Graficas1Component },
16+
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' }
17+
]
18+
}
19+
];
20+
21+
export const PAGES_ROUTES = RouterModule.forChild( pagesRoutes );

src/app/shared/shared.module.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { NgModule } from '@angular/core';
2+
import { BreadcrumbsComponent } from './breadcrumbs/breadcrumbs.component';
3+
import { HeaderComponent } from './header/header.component';
4+
import { NopagefoundComponent } from './nopagefound/nopagefound.component';
5+
import { SidebarComponent } from './sidebar/sidebar.component';
6+
7+
@NgModule({
8+
declarations: [
9+
BreadcrumbsComponent,
10+
HeaderComponent,
11+
NopagefoundComponent,
12+
SidebarComponent
13+
],
14+
exports: [
15+
BreadcrumbsComponent,
16+
HeaderComponent,
17+
NopagefoundComponent,
18+
SidebarComponent
19+
]
20+
})
21+
export class SharedModule {}

0 commit comments

Comments
 (0)