mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-23 19:00:13 +01:00
feat(rc5): update to angular rc.5
- NgaModule - module wrapper for all ng2-admin custom features - Ng Module per page - async components load - menu moved (again) to a separate file (as now each module has its own route file) - no need to import Ba* directives into the pages which have NgaModule in the import statement
This commit is contained in:
parent
983f6f1675
commit
5b7c132eac
86 changed files with 854 additions and 384 deletions
117
src/app/theme/nga.module.ts
Normal file
117
src/app/theme/nga.module.ts
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
|
||||
import {
|
||||
BaThemeConfig
|
||||
} from './theme.config';
|
||||
|
||||
import {
|
||||
BaThemeConfigProvider
|
||||
} from './theme.configProvider';
|
||||
|
||||
import {
|
||||
BaAmChart,
|
||||
BaBackTop,
|
||||
BaCard,
|
||||
BaChartistChart,
|
||||
BaCheckbox,
|
||||
BaContentTop,
|
||||
BaFullCalendar,
|
||||
BaMenu,
|
||||
BaMsgCenter,
|
||||
BaMultiCheckbox,
|
||||
BaPageTop,
|
||||
BaPictureUploader,
|
||||
BaSidebar
|
||||
} from './components';
|
||||
|
||||
import {
|
||||
BaScrollPosition,
|
||||
BaSlimScroll,
|
||||
BaThemeRun
|
||||
} from './directives';
|
||||
|
||||
import {
|
||||
BaAppPicturePipe,
|
||||
BaKameleonPicturePipe,
|
||||
BaProfilePicturePipe
|
||||
} from './pipes';
|
||||
|
||||
import {
|
||||
BaImageLoaderService,
|
||||
BaThemePreloader,
|
||||
BaThemeSpinner
|
||||
} from './services';
|
||||
|
||||
import {
|
||||
EmailValidator,
|
||||
EqualPasswordsValidator
|
||||
} from './validators';
|
||||
|
||||
const NGA_COMPONENTS = [
|
||||
BaAmChart,
|
||||
BaBackTop,
|
||||
BaCard,
|
||||
BaChartistChart,
|
||||
BaCheckbox,
|
||||
BaContentTop,
|
||||
BaFullCalendar,
|
||||
BaMenu,
|
||||
BaMsgCenter,
|
||||
BaMultiCheckbox,
|
||||
BaPageTop,
|
||||
BaPictureUploader,
|
||||
BaSidebar
|
||||
];
|
||||
|
||||
const NGA_DIRECTIVES = [
|
||||
BaScrollPosition,
|
||||
BaSlimScroll,
|
||||
BaThemeRun
|
||||
];
|
||||
|
||||
const NGA_PIPES = [
|
||||
BaAppPicturePipe,
|
||||
BaKameleonPicturePipe,
|
||||
BaProfilePicturePipe
|
||||
];
|
||||
|
||||
const NGA_SERVICES = [
|
||||
BaImageLoaderService,
|
||||
BaThemePreloader,
|
||||
BaThemeSpinner
|
||||
];
|
||||
|
||||
const NGA_VALIDATORS = [
|
||||
EmailValidator,
|
||||
EqualPasswordsValidator
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
...NGA_PIPES,
|
||||
...NGA_DIRECTIVES,
|
||||
...NGA_COMPONENTS
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
],
|
||||
providers: [
|
||||
BaThemeConfigProvider,
|
||||
BaThemeConfig,
|
||||
...NGA_VALIDATORS,
|
||||
...NGA_SERVICES
|
||||
],
|
||||
exports: [
|
||||
...NGA_PIPES,
|
||||
...NGA_DIRECTIVES,
|
||||
...NGA_COMPONENTS
|
||||
]
|
||||
})
|
||||
export class NgaModule {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue