mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +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, TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
|
||||
@@ -113,15 +113,4 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [
|
||||
MaterialModule
|
||||
]
|
||||
})
|
||||
export class DocumentListModule {
|
||||
/** @deprecated in 1.8.0 */
|
||||
static forRoot(): ModuleWithProviders {
|
||||
console.log('DocumentListModule.forRoot is deprecated and will be removed in future versions');
|
||||
return {
|
||||
ngModule: DocumentListModule,
|
||||
providers: [
|
||||
...DOCUMENT_LIST_PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
export class DocumentListModule {}
|
||||
|
@@ -69,8 +69,8 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
function setupTestbed(plusProviders) {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
DataTableModule.forRoot(),
|
||||
CoreModule,
|
||||
DataTableModule,
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -71,7 +71,7 @@ describe('DropdownSitesComponent', () => {
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
CoreModule,
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -29,7 +29,7 @@ describe('ShareDataTableAdapter', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreModule
|
||||
],
|
||||
providers: [
|
||||
DocumentListService
|
||||
@@ -352,7 +352,7 @@ describe('ShareDataRow', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreModule
|
||||
],
|
||||
providers: [
|
||||
DocumentListService
|
||||
|
Reference in New Issue
Block a user