mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1548] deprecate the usage of the "forRoot" methods in modules (#2344)
* remove CoreModule.forRoot * remove forRoot methods * fix form issues (lint)
This commit is contained in:
committed by
Eugenio Romano
parent
cd46a589e1
commit
95d6a04f99
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { MaterialModule } from './src/material.module';
|
||||
@@ -63,22 +63,11 @@ export const VIEWER_DIRECTIVES: any[] = [
|
||||
ViewerService
|
||||
],
|
||||
exports: [
|
||||
MaterialModule,
|
||||
...VIEWER_DIRECTIVES
|
||||
],
|
||||
entryComponents: [
|
||||
ViewerDialogComponent
|
||||
]
|
||||
})
|
||||
export class ViewerModule {
|
||||
/** @deprecated in 1.8.0 */
|
||||
static forRoot(): ModuleWithProviders {
|
||||
console.log('ViewerModule.forRoot is deprecated and will be removed in future versions');
|
||||
return {
|
||||
ngModule: ViewerModule,
|
||||
providers: [
|
||||
RenderingQueueServices,
|
||||
ViewerService
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
export class ViewerModule {}
|
||||
|
@@ -35,7 +35,7 @@ describe('ExtensionViewerComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule.forRoot()],
|
||||
imports: [CoreModule],
|
||||
providers: [
|
||||
ExtensionViewerDirective,
|
||||
{provide: ElementRef, useClass: MockElementRef},
|
||||
|
Reference in New Issue
Block a user