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, TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
|
||||
import { MaterialModule } from './src/material.module';
|
||||
|
||||
@@ -59,26 +59,4 @@ export const USER_INFO_PROVIDERS: any[] = [
|
||||
...USER_INFO_DIRECTIVES
|
||||
]
|
||||
})
|
||||
|
||||
export class UserInfoModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: UserInfoModule,
|
||||
providers: [
|
||||
...USER_INFO_PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated in 1.9.0 */
|
||||
export class UserInfoComponentModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: UserInfoComponentModule,
|
||||
providers: [
|
||||
...USER_INFO_PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
export class UserInfoModule {}
|
||||
|
@@ -48,7 +48,7 @@ describe('User info component', () => {
|
||||
window['componentHandler'] = componentHandler;
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
CoreModule,
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -29,7 +29,7 @@ describe('Bpm user service', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreModule
|
||||
],
|
||||
providers: [
|
||||
BpmUserService
|
||||
|
@@ -31,7 +31,7 @@ describe('EcmUserService', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreModule
|
||||
],
|
||||
providers: [
|
||||
EcmUserService
|
||||
|
Reference in New Issue
Block a user