[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:
Denys Vuika
2018-01-31 17:39:26 +00:00
committed by Eugenio Romano
parent 49456b3fcd
commit 0d93c65fd7
23 changed files with 298 additions and 165 deletions

View File

@@ -17,6 +17,7 @@ var appContext = require.context(".", true, /.spec.ts/);appContext.keys().forEac
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;
@@ -31,7 +32,14 @@ TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platfor
beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreModule, TranslateModule, CommonModule, FormsModule, ReactiveFormsModule],
imports: [
NoopAnimationsModule,
CoreModule,
TranslateModule,
CommonModule,
FormsModule,
ReactiveFormsModule
],
providers: [
{provide: AppConfigService, useClass: AppConfigServiceMock},
{provide: TranslationService, useClass: TranslationMock}