mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-18 14:22:35 +00:00
56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { SharedModule } from '../../../core/modules/shared.module';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { MailComponent } from './mail.component';
|
|
import { MainSidenavComponent } from './sidenavs/main/main-sidenav.component';
|
|
import { MailListItemComponent } from './mail-list/mail-list-item/mail-list-item.component';
|
|
import { MailListComponent } from './mail-list/mail-list.component';
|
|
import { MailDetailsComponent } from './mail-details/mail-details.component';
|
|
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
|
|
import { MailFakeDbService } from './mail-fake-db.service';
|
|
import { HttpModule } from '@angular/http';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path : 'label/:labelHandle',
|
|
children: [
|
|
{
|
|
path: ':mailId'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path : ':folderHandle',
|
|
component: MailComponent,
|
|
children : [
|
|
{
|
|
path: ':mailId'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path : '**',
|
|
redirectTo: 'inbox'
|
|
}
|
|
];
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
MailComponent,
|
|
MainSidenavComponent,
|
|
MailListComponent,
|
|
MailListItemComponent,
|
|
MailDetailsComponent
|
|
],
|
|
imports : [
|
|
SharedModule,
|
|
HttpModule,
|
|
InMemoryWebApiModule.forRoot(MailFakeDbService),
|
|
RouterModule.forChild(routes)
|
|
],
|
|
providers : []
|
|
})
|
|
export class MailModule
|
|
{
|
|
}
|