-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
dashboard.module.ts
72 lines (69 loc) · 2.58 KB
/
dashboard.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { SharedModule } from '@ngx-starter-kit/shared';
import { AuthGuard } from '@ngx-starter-kit/auth';
import { ChatBoxModule } from '@ngx-starter-kit/chat-box';
import { DashboardLayoutComponent } from './containers/dashboard-layout/dashboard-layout.component';
import { OverviewComponent } from './containers/overview/overview.component';
import { SettingsComponent } from './containers/settings/settings.component';
import { RainbowComponent } from './components/rainbow/rainbow.component';
import { QuickpanelModule } from '@ngx-starter-kit/quickpanel';
import { ToolbarModule } from '@ngx-starter-kit/toolbar';
import { SidenavModule } from '@ngx-starter-kit/sidenav';
import { environment } from '@env/environment';
import { ProfileComponent } from './containers/profile/profile.component';
@NgModule({
imports: [
SharedModule,
SidenavModule,
ToolbarModule,
QuickpanelModule,
// FIXME: AOT not working with environment.xyz
ChatBoxModule.forRoot({
accessToken: '37808bf14a19406cbe2a50cfd1332dd3', // environment.dialogFlow.apiToken
}),
RouterModule.forChild([
/* {path: '', pathMatch: 'full', component: InsertYourComponentHere} */
{
path: '',
component: DashboardLayoutComponent,
canActivate: [AuthGuard],
data: { title: 'Dashboard', depth: 1 },
children: [
{
path: '',
component: OverviewComponent,
data: { title: 'Overview' },
},
{
path: 'profile',
component: ProfileComponent,
data: { title: 'Settings', depth: '2' },
},
{
path: 'settings',
component: SettingsComponent,
data: { title: 'Settings', depth: '2' },
},
{
path: 'widgets',
loadChildren: '@ngx-starter-kit/widgets#WidgetsModule',
data: { title: 'Widgets', depth: '2', preload: false },
},
{
path: 'grid',
loadChildren: '@ngx-starter-kit/grid#GridModule',
data: { title: 'Grid', depth: 2, preload: false },
},
{
path: 'experiments',
loadChildren: '@ngx-starter-kit/experiments#ExperimentsModule',
data: { title: 'Experiments', depth: 2, preload: false },
},
],
},
]),
],
declarations: [DashboardLayoutComponent, OverviewComponent, RainbowComponent, ProfileComponent, SettingsComponent],
})
export class DashboardModule {}