mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2064] Lazy loading support (#2811)
* remove BrowserAnimationsModule dependency * improve test shim * update test shim * test shim updates * example of lazy-loaded datatable * local and global i18n demo for lazy modules * lazy loading support for CoreModule providers * test shim updates * update test shim * support global i18n for lazy modules * cleanup lazy loading example * update card view after rebase * backwards compatibility * cleanup files * fix code after rebase
This commit is contained in:
committed by
Eugenio Romano
parent
49456b3fcd
commit
0d93c65fd7
@@ -18,7 +18,6 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { CoreModule, TRANSLATION_PROVIDER } from '@alfresco/adf-core';
|
||||
|
||||
import { DiagramsModule } from './diagram/diagram.module';
|
||||
@@ -32,7 +31,6 @@ import { MaterialModule } from './material.module';
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
BrowserAnimationsModule,
|
||||
MaterialModule,
|
||||
DiagramsModule,
|
||||
AnalyticsProcessModule
|
||||
@@ -52,7 +50,7 @@ import { MaterialModule } from './material.module';
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
BrowserAnimationsModule,
|
||||
MaterialModule,
|
||||
DiagramsModule,
|
||||
AnalyticsProcessModule
|
||||
]
|
||||
|
@@ -13,10 +13,12 @@ require('zone.js/dist/fake-async-test');
|
||||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
|
||||
|
||||
var appContext = require.context(".", true, /.spec.ts/);appContext.keys().forEach(appContext);
|
||||
var appContext = require.context(".", true, /.spec.ts/);
|
||||
appContext.keys().forEach(appContext);
|
||||
|
||||
const TestBed = require('@angular/core/testing').TestBed;
|
||||
const browser = require('@angular/platform-browser-dynamic/testing');
|
||||
const NoopAnimationsModule = require('@angular/platform-browser/animations').NoopAnimationsModule;
|
||||
const CoreModule = require('@alfresco/adf-core').CoreModule;
|
||||
const AppConfigService = require('@alfresco/adf-core').AppConfigService;
|
||||
const AppConfigServiceMock = require('@alfresco/adf-core').AppConfigServiceMock;
|
||||
@@ -29,7 +31,10 @@ patchTestBedToDestroyFixturesAfterEveryTest(TestBed);
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
providers: [
|
||||
{provide: AppConfigService, useClass: AppConfigServiceMock},
|
||||
{provide: TranslationService, useClass: TranslationMock}
|
||||
|
Reference in New Issue
Block a user