mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Greatly reduced module imports hierarchy
- it is no longer needed manually importing numerous modules as CoreModule re-exports them
This commit is contained in:
parent
a92716c438
commit
dd2d41db2c
@ -16,11 +16,8 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { SearchModule } from 'ng2-alfresco-search';
|
||||
import { LoginModule } from 'ng2-alfresco-login';
|
||||
@ -37,9 +34,6 @@ import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
|
||||
import { AppComponent } from './app.component';
|
||||
import { routing } from './app.routes';
|
||||
|
||||
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
|
||||
import { Http } from '@angular/http';
|
||||
|
||||
import {
|
||||
DataTableDemoComponent,
|
||||
SearchComponent,
|
||||
@ -57,14 +51,6 @@ import {
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule.forRoot({
|
||||
provide: TranslateLoader,
|
||||
useFactory: (http) => new AlfrescoTranslationLoader(http),
|
||||
deps: [Http]
|
||||
}),
|
||||
routing,
|
||||
CoreModule.forRoot(),
|
||||
LoginModule,
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { ActivitiForm } from './src/components/activiti-form.component';
|
||||
@ -52,10 +48,6 @@ export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
||||
@ -56,10 +52,6 @@ export const ACTIVITI_PROCESSLIST_PROVIDERS: [any] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
DataTableModule,
|
||||
ActivitiTaskListModule
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||
@ -60,10 +56,6 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
DataTableModule,
|
||||
ActivitiFormModule
|
||||
|
@ -16,9 +16,10 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { HttpModule, Http } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||
|
||||
import {
|
||||
AlfrescoApiService,
|
||||
@ -49,8 +50,14 @@ export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule
|
||||
TranslateModule.forRoot({
|
||||
provide: TranslateLoader,
|
||||
useFactory: (http) => new AlfrescoTranslationLoader(http),
|
||||
deps: [Http]
|
||||
})
|
||||
],
|
||||
declarations: [
|
||||
...MATERIAL_DESIGN_DIRECTIVES,
|
||||
@ -60,6 +67,11 @@ export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
||||
...ALFRESCO_CORE_PROVIDERS
|
||||
],
|
||||
exports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
...MATERIAL_DESIGN_DIRECTIVES,
|
||||
...CONTEXT_MENU_DIRECTIVES
|
||||
]
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
@ -143,10 +141,8 @@ class DataTableDemo {
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
CoreModule.forRoot(),
|
||||
DataTableModule,
|
||||
TranslateModule.forRoot()
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [ DataTableDemo ],
|
||||
bootstrap: [ DataTableDemo ]
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
export * from './src/data/index';
|
||||
@ -38,10 +34,6 @@ export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -18,11 +18,8 @@
|
||||
|
||||
import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule, Http } from '@angular/http';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule, AlfrescoTranslationLoader } from 'ng2-alfresco-core';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
||||
|
||||
@ -214,16 +211,9 @@ class DocumentListDemo implements OnInit {
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
CoreModule.forRoot(),
|
||||
DataTableModule,
|
||||
DocumentListModule.forRoot(),
|
||||
TranslateModule.forRoot({
|
||||
provide: TranslateLoader,
|
||||
useFactory: (http) => new AlfrescoTranslationLoader(http),
|
||||
deps: [Http]
|
||||
})
|
||||
DocumentListModule.forRoot()
|
||||
],
|
||||
declarations: [ DocumentListDemo ],
|
||||
bootstrap: [ DocumentListDemo ]
|
||||
|
@ -16,9 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
|
||||
@ -73,9 +70,6 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
DataTableModule
|
||||
],
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { AlfrescoLoginComponent } from './src/components/alfresco-login.component';
|
||||
@ -30,11 +26,6 @@ export const ALFRESCO_LOGIN_DIRECTIVES: any[] = [AlfrescoLoginComponent];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { AlfrescoSearchService } from './src/services/alfresco-search.service';
|
||||
@ -47,11 +43,6 @@ export const ALFRESCO_SEARCH_PROVIDERS: [any] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -16,10 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { TagActionsComponent } from './src/components/tag-actions.component';
|
||||
@ -44,10 +40,6 @@ export const TAG_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -16,9 +16,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { UploadDragAreaComponent } from './src/components/upload-drag-area.component';
|
||||
@ -65,9 +62,6 @@ export const UPLOAD_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -25,9 +25,7 @@
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { ViewerComponent } from './src/componets/viewer.component';
|
||||
import { RenderingQueueServices } from './src/services/rendering-queue.services';
|
||||
@ -57,9 +55,7 @@ export const VIEWER_PROVIDERS: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpModule,
|
||||
TranslateModule
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
...VIEWER_DIRECTIVES
|
||||
|
@ -16,13 +16,8 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { WebscriptComponent } from './src/webscript.component';
|
||||
|
||||
@ -38,10 +33,6 @@ export const WEBSCRIPT_DIRECTIVES: any[] = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
DataTableModule
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user