app/src/commons/commons.module.ts

35 lines
863 B
TypeScript
Raw Normal View History

2018-08-17 00:10:51 +00:00
import { NgModule, APP_INITIALIZER } from '@angular/core';
import { CommonModule } from '@angular/common';
2018-08-17 10:53:40 +00:00
import { CommonsUIModule } from '@overflow/commons/ui/commons-ui.module';
2018-09-19 10:04:35 +00:00
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
2018-08-17 10:53:40 +00:00
import { COMPONENTS } from './component';
2018-08-17 00:10:51 +00:00
2018-09-19 10:04:35 +00:00
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
2018-09-19 04:40:32 +00:00
2018-08-17 00:10:51 +00:00
@NgModule({
imports: [
CommonModule,
2018-08-17 10:53:40 +00:00
CommonsUIModule,
2018-09-19 10:04:35 +00:00
PerfectScrollbarModule
2018-08-17 10:53:40 +00:00
],
exports: [
...COMPONENTS,
2018-08-17 00:10:51 +00:00
],
declarations: [
2018-08-17 10:53:40 +00:00
...COMPONENTS,
2018-08-17 00:10:51 +00:00
],
2018-09-19 10:04:35 +00:00
providers: [
{
provide: PERFECT_SCROLLBAR_CONFIG,
useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG
}
]
2018-08-17 00:10:51 +00:00
})
export class CommonsModule { }