[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:
Denys Vuika
2017-09-18 14:35:41 +01:00
committed by Eugenio Romano
parent cd46a589e1
commit 95d6a04f99
73 changed files with 120 additions and 282 deletions

View File

@@ -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 {}

View File

@@ -69,8 +69,8 @@ describe('ContentNodeSelectorComponent', () => {
function setupTestbed(plusProviders) {
TestBed.configureTestingModule({
imports: [
CoreModule.forRoot(),
DataTableModule.forRoot(),
CoreModule,
DataTableModule,
MaterialModule
],
declarations: [

View File

@@ -71,7 +71,7 @@ describe('DropdownSitesComponent', () => {
TestBed.configureTestingModule({
imports: [
CoreModule.forRoot(),
CoreModule,
MaterialModule
],
declarations: [

View File

@@ -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