Skip to content

Commit

Permalink
Se agregan y modifican módulos
Browse files Browse the repository at this point in the history
  • Loading branch information
falvarador committed Apr 5, 2020
1 parent 477f275 commit cd5fd7b
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/app/pages/pages.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { NgModule } from '@angular/core';

// Modules
import { SharedModule } from '../shared/shared.module';

// Routes
import { PAGES_ROUTES } from './pages.routes';

// Components
import { PagesComponent } from './pages.component';

import { DashboardComponent } from './dashboard/dashboard.component';
import { ProgressComponent } from './progress/progress.component';
import { Graphics1Component } from './graphics1/graphics1.component';

@NgModule({
declarations: [
PagesComponent,
DashboardComponent,
ProgressComponent,
Graphics1Component,
],
exports: [
DashboardComponent,
ProgressComponent,
Graphics1Component,
],
imports: [
SharedModule,
PAGES_ROUTES
]
})

export class PagesModule { }
23 changes: 23 additions & 0 deletions src/app/pages/pages.routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { RouterModule, Routes } from '@angular/router';

// Components
import { PagesComponent } from './pages.component';

import { DashboardComponent } from './dashboard/dashboard.component';
import { ProgressComponent } from './progress/progress.component';
import { Graphics1Component } from './graphics1/graphics1.component';

const pagesRoutes: Routes = [
{
path: '',
component: PagesComponent,
children: [
{ path: 'dashboard', component: DashboardComponent },
{ path: 'progress', component: ProgressComponent },
{ path: 'graphics1', component: Graphics1Component },
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
]
}
];

export const PAGES_ROUTES = RouterModule.forChild( pagesRoutes );
24 changes: 24 additions & 0 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core';

// Components
import { BreadcrumbsComponent } from './breadcrumbs/breadcrumbs.component';
import { HeaderComponent } from './header/header.component';
import { NopagefoundComponent } from './nopagefound/nopagefound.component';
import { SidebarComponent } from './sidebar/sidebar.component';

@NgModule({
declarations: [
BreadcrumbsComponent,
HeaderComponent,
NopagefoundComponent,
SidebarComponent,
],
exports: [
BreadcrumbsComponent,
HeaderComponent,
NopagefoundComponent,
SidebarComponent,
]
})

export class SharedModule { }

0 comments on commit cd5fd7b

Please sign in to comment.