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