2018-05-14 17:14:21 +01:00
import { environment } from '../environments/environment' ;
2017-04-27 15:29:31 +01:00
import { BrowserModule } from '@angular/platform-browser' ;
import { NgModule } from '@angular/core' ;
import { LocationStrategy , HashLocationStrategy } from '@angular/common' ;
2017-11-15 14:12:28 +00:00
import { HttpClientModule } from '@angular/common/http' ;
2017-04-27 15:29:31 +01:00
import { AppComponent } from './app.component' ;
import { BsDropdownModule } from 'ngx-bootstrap/dropdown' ;
import { TabsModule } from 'ngx-bootstrap/tabs' ;
2017-09-06 17:51:56 +01:00
import { NgxPaginationModule } from 'ngx-pagination' ;
2017-04-27 15:29:31 +01:00
import { NAV_DROPDOWN_DIRECTIVES } from './shared/nav-dropdown.directive' ;
import { SIDEBAR_TOGGLE_DIRECTIVES } from './shared/sidebar.directive' ;
import { AsideToggleDirective } from './shared/aside.directive' ;
import { BreadcrumbsComponent } from './shared/breadcrumb.component' ;
2017-06-08 14:28:54 +01:00
// Routing & Guard Module
2017-04-27 15:29:31 +01:00
import { AppRoutingModule } from './app.routing' ;
2017-06-08 16:05:01 +01:00
import { AuthGuard } from './_guards/auth.guard' ;
2017-08-31 18:44:17 +01:00
import { OrgGuard } from './_guards/org.guard' ;
import { CustomerGuard } from './_guards/customer.guard' ;
2017-08-15 17:41:27 +01:00
import { ApiService } from './providers/api-service' ;
2017-04-27 15:29:31 +01:00
2017-08-29 17:39:27 +01:00
import { OrgGraphsService } from './providers/org-graphs.service' ;
2017-12-12 15:10:44 +00:00
import { CustGraphsService } from './providers/cust-graphs.service' ;
2017-09-07 15:12:49 +01:00
import { OrgSnippetsService } from './providers/org-snippets.service' ;
2017-12-12 15:10:44 +00:00
import { CustSnippetsService } from './providers/cust-snippets.service' ;
2017-12-14 16:44:23 +00:00
import { CustPiesService } from './providers/cust-pies.service' ;
2017-08-29 17:39:27 +01:00
2017-04-27 15:29:31 +01:00
// Layouts
import { FullLayoutComponent } from './layouts/full-layout.component' ;
import { SimpleLayoutComponent } from './layouts/simple-layout.component' ;
2017-08-15 16:12:55 +01:00
// Error Pages
import { P404Component } from './pages/404.component' ;
import { P500Component } from './pages/500.component' ;
2017-08-15 15:59:43 +01:00
// Submodules
import { AuthModule } from './auth/auth.module' ;
2017-08-15 17:41:27 +01:00
import { DashboardModule } from './dashboard/dashboard.module' ;
2017-08-15 15:59:43 +01:00
2019-07-04 15:34:42 +01:00
import { DxChartModule } from 'devextreme-angular' ;
import { StackedBarChartComponent } from './panels/stacked-bar.component' ;
import { NewSectionComponent } from './dashboard/new-section.component' ;
2018-05-14 17:14:21 +01:00
2017-04-27 15:29:31 +01:00
@NgModule ( {
imports : [
BrowserModule ,
2017-11-15 14:12:28 +00:00
HttpClientModule ,
2019-07-04 15:34:42 +01:00
DxChartModule ,
2017-09-06 17:51:56 +01:00
NgxPaginationModule ,
2017-04-27 15:29:31 +01:00
BsDropdownModule . forRoot ( ) ,
TabsModule . forRoot ( ) ,
2017-08-15 15:59:43 +01:00
AuthModule ,
2017-08-15 17:41:27 +01:00
DashboardModule ,
// Loaded last to allow for 404 catchall
AppRoutingModule ,
2017-04-27 15:29:31 +01:00
] ,
declarations : [
AppComponent ,
2019-07-04 15:34:42 +01:00
StackedBarChartComponent ,
2017-04-27 15:29:31 +01:00
FullLayoutComponent ,
SimpleLayoutComponent ,
NAV_DROPDOWN_DIRECTIVES ,
BreadcrumbsComponent ,
SIDEBAR_TOGGLE_DIRECTIVES ,
AsideToggleDirective ,
2019-07-04 15:34:42 +01:00
NewSectionComponent ,
2017-08-15 16:12:55 +01:00
P404Component ,
P500Component ,
2017-04-27 15:29:31 +01:00
] ,
2017-06-08 14:28:54 +01:00
providers : [
2017-08-24 16:03:45 +01:00
AuthGuard ,
2017-08-31 18:44:17 +01:00
OrgGuard ,
CustomerGuard ,
2017-08-24 16:03:45 +01:00
ApiService ,
2017-08-29 17:39:27 +01:00
OrgGraphsService ,
2017-09-07 15:12:49 +01:00
OrgSnippetsService ,
2017-12-12 15:10:44 +00:00
CustGraphsService ,
CustSnippetsService ,
2017-12-14 16:44:23 +00:00
CustPiesService ,
2017-08-24 16:03:45 +01:00
{
provide : LocationStrategy ,
useClass : HashLocationStrategy
}
] ,
2017-04-27 15:29:31 +01:00
bootstrap : [ AppComponent ]
} )
2018-05-14 17:14:21 +01:00
export class AppModule {
constructor ( ) {
if ( environment . enableAnalytics ) {
( < any > window ) . ga ( 'create' , environment . analyticsKey , 'auto' ) ;
}
}
}