From 20b87c3a127e5c61f1cfa758840d5e6f36467a4d Mon Sep 17 00:00:00 2001 From: Ed Morales Date: Mon, 1 May 2017 13:23:44 -0700 Subject: [PATCH] chore(all): remove forRoot() deprecations. (#534) * chore(all): remove forRoot() deprecations. they were deprecated in beta.3, so we can remove them for beta.4 now * fix(): remove forRoot from docs in http module --- .../components/components/http/http.component.html | 2 +- src/platform/core/chips/chips.module.ts | 12 +----------- src/platform/core/common/common.module.ts | 12 +----------- src/platform/core/data-table/data-table.module.ts | 12 +----------- src/platform/core/dialogs/dialogs.module.ts | 12 +----------- .../core/expansion-panel/expansion-panel.module.ts | 12 +----------- src/platform/core/file/file.module.ts | 12 +----------- src/platform/core/index.ts | 12 +----------- .../core/json-formatter/json-formatter.module.ts | 12 +----------- src/platform/core/layout/layout.module.ts | 12 +----------- src/platform/core/loading/loading.module.ts | 12 +----------- src/platform/core/media/media.module.ts | 12 +----------- src/platform/core/menu/menu.module.ts | 12 +----------- .../core/notifications/notifications.module.ts | 12 +----------- src/platform/core/paging/paging.module.ts | 12 +----------- src/platform/core/search/search.module.ts | 12 +----------- src/platform/core/steps/steps.module.ts | 12 +----------- src/platform/dynamic-forms/dynamic-forms.module.ts | 12 +----------- src/platform/highlight/highlight.module.ts | 12 +----------- src/platform/markdown/markdown.module.ts | 12 +----------- 20 files changed, 20 insertions(+), 210 deletions(-) diff --git a/src/app/components/components/http/http.component.html b/src/app/components/components/http/http.component.html index 803eddcdab..17414f3e84 100644 --- a/src/app/components/components/http/http.component.html +++ b/src/app/components/components/http/http.component.html @@ -85,7 +85,7 @@

Setup:

@NgModule({ imports: [ - HttpModule, /* or CovalentCoreModule.forRoot() */ + HttpModule, /* or CovalentCoreModule */ CovalentHttpModule.forRoot({ interceptors: [{ interceptor: CustomInterceptor, paths: ['**'], diff --git a/src/platform/core/chips/chips.module.ts b/src/platform/core/chips/chips.module.ts index 481a8c71fe..90bbb29763 100644 --- a/src/platform/core/chips/chips.module.ts +++ b/src/platform/core/chips/chips.module.ts @@ -25,15 +25,5 @@ export { TdChipsComponent } from './chips.component'; ], }) export class CovalentChipsModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentChipsModule, - providers: [], - }; - } + } diff --git a/src/platform/core/common/common.module.ts b/src/platform/core/common/common.module.ts index 0950800e7e..fafe581edf 100644 --- a/src/platform/core/common/common.module.ts +++ b/src/platform/core/common/common.module.ts @@ -90,15 +90,5 @@ export { TdTimeAgoPipe, TdTimeDifferencePipe, ], }) export class CovalentCommonModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentCommonModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/data-table/data-table.module.ts b/src/platform/core/data-table/data-table.module.ts index 9e31c7de8d..532e5d9e40 100644 --- a/src/platform/core/data-table/data-table.module.ts +++ b/src/platform/core/data-table/data-table.module.ts @@ -49,15 +49,5 @@ export { TdDataTableTableComponent } from './data-table-table/data-table-table.c ], }) export class CovalentDataTableModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentDataTableModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/dialogs/dialogs.module.ts b/src/platform/core/dialogs/dialogs.module.ts index 2115dbdd5b..c42b48d416 100644 --- a/src/platform/core/dialogs/dialogs.module.ts +++ b/src/platform/core/dialogs/dialogs.module.ts @@ -54,15 +54,5 @@ export { TdDialogService, TdDialogComponent, TdDialogTitleDirective, ], }) export class CovalentDialogsModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentDialogsModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/expansion-panel/expansion-panel.module.ts b/src/platform/core/expansion-panel/expansion-panel.module.ts index 5b60f49fd7..508675cffe 100644 --- a/src/platform/core/expansion-panel/expansion-panel.module.ts +++ b/src/platform/core/expansion-panel/expansion-panel.module.ts @@ -32,15 +32,5 @@ export { TdExpansionPanelComponent } from './expansion-panel.component'; ], }) export class CovalentExpansionPanelModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentExpansionPanelModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/file/file.module.ts b/src/platform/core/file/file.module.ts index a6fb066a53..2710a0c956 100644 --- a/src/platform/core/file/file.module.ts +++ b/src/platform/core/file/file.module.ts @@ -48,15 +48,5 @@ export { TdFileService, IUploadOptions } from './services/file.service'; ], }) export class CovalentFileModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentFileModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/index.ts b/src/platform/core/index.ts index df43357adb..187be5b41a 100644 --- a/src/platform/core/index.ts +++ b/src/platform/core/index.ts @@ -164,15 +164,5 @@ export * from './steps/steps.module'; ], }) export class CovalentCoreModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentCoreModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/json-formatter/json-formatter.module.ts b/src/platform/core/json-formatter/json-formatter.module.ts index d3438a33f6..c009ed2f1b 100644 --- a/src/platform/core/json-formatter/json-formatter.module.ts +++ b/src/platform/core/json-formatter/json-formatter.module.ts @@ -21,15 +21,5 @@ export { TdJsonFormatterComponent } from './json-formatter.component'; ], }) export class CovalentJsonFormatterModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentJsonFormatterModule, - providers: [], - }; - } + } diff --git a/src/platform/core/layout/layout.module.ts b/src/platform/core/layout/layout.module.ts index 90b3262645..6d3bc8ff2a 100644 --- a/src/platform/core/layout/layout.module.ts +++ b/src/platform/core/layout/layout.module.ts @@ -49,15 +49,5 @@ export { TdLayoutComponent, TdLayoutNavComponent, TdLayoutNavListComponent, ], }) export class CovalentLayoutModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentLayoutModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/loading/loading.module.ts b/src/platform/core/loading/loading.module.ts index 2882319523..9224233f33 100644 --- a/src/platform/core/loading/loading.module.ts +++ b/src/platform/core/loading/loading.module.ts @@ -44,15 +44,5 @@ export { TdLoadingService, ITdLoadingConfig } from './services/loading.service'; ], }) export class CovalentLoadingModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentLoadingModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/media/media.module.ts b/src/platform/core/media/media.module.ts index afd38f91aa..5147ee25bd 100644 --- a/src/platform/core/media/media.module.ts +++ b/src/platform/core/media/media.module.ts @@ -27,15 +27,5 @@ export { TdMediaService, TdMediaToggleDirective }; ], }) export class CovalentMediaModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentMediaModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/menu/menu.module.ts b/src/platform/core/menu/menu.module.ts index ce29b599d6..5cfc6edfe8 100644 --- a/src/platform/core/menu/menu.module.ts +++ b/src/platform/core/menu/menu.module.ts @@ -26,15 +26,5 @@ export { TdMenuComponent } from './menu.component'; ], }) export class CovalentMenuModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentMenuModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/notifications/notifications.module.ts b/src/platform/core/notifications/notifications.module.ts index 20ac7cd59a..3382395cf9 100644 --- a/src/platform/core/notifications/notifications.module.ts +++ b/src/platform/core/notifications/notifications.module.ts @@ -25,15 +25,5 @@ export { TdNotificationCountComponent, TdNotificationCountPositionX, TdNotificat ], }) export class CovalentNotificationsModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentNotificationsModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/paging/paging.module.ts b/src/platform/core/paging/paging.module.ts index ced7b61e4a..6a9a963cbe 100644 --- a/src/platform/core/paging/paging.module.ts +++ b/src/platform/core/paging/paging.module.ts @@ -25,15 +25,5 @@ export { TdPagingBarComponent, IPageChangeEvent } from './paging-bar.component'; ], }) export class CovalentPagingModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentPagingModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/search/search.module.ts b/src/platform/core/search/search.module.ts index 017916975a..400d2868ae 100644 --- a/src/platform/core/search/search.module.ts +++ b/src/platform/core/search/search.module.ts @@ -29,15 +29,5 @@ export { TdSearchInputComponent } from './search-input/search-input.component'; ], }) export class CovalentSearchModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentSearchModule, - providers: [ ], - }; - } + } diff --git a/src/platform/core/steps/steps.module.ts b/src/platform/core/steps/steps.module.ts index 53c0c83a8e..b08d118908 100644 --- a/src/platform/core/steps/steps.module.ts +++ b/src/platform/core/steps/steps.module.ts @@ -42,15 +42,5 @@ export { TdStepsComponent, IStepChangeEvent, StepMode } from './steps.component' ], }) export class CovalentStepsModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentStepsModule, - providers: [ ], - }; - } + } diff --git a/src/platform/dynamic-forms/dynamic-forms.module.ts b/src/platform/dynamic-forms/dynamic-forms.module.ts index dbb1a28338..cf0187b8f4 100644 --- a/src/platform/dynamic-forms/dynamic-forms.module.ts +++ b/src/platform/dynamic-forms/dynamic-forms.module.ts @@ -61,15 +61,5 @@ const TD_DYNAMIC_FORMS_ENTRY_COMPONENTS: Type[] = [ entryComponents: [ TD_DYNAMIC_FORMS_ENTRY_COMPONENTS ], }) export class CovalentDynamicFormsModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentDynamicFormsModule, - providers: [ ], - }; - } + } diff --git a/src/platform/highlight/highlight.module.ts b/src/platform/highlight/highlight.module.ts index 13e5dbb407..da67bcaedd 100644 --- a/src/platform/highlight/highlight.module.ts +++ b/src/platform/highlight/highlight.module.ts @@ -15,15 +15,5 @@ import { TdHighlightComponent } from './highlight.component'; ], }) export class CovalentHighlightModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentHighlightModule, - providers: [], - }; - } + } diff --git a/src/platform/markdown/markdown.module.ts b/src/platform/markdown/markdown.module.ts index 6f0fb2a847..4b7b2650f7 100644 --- a/src/platform/markdown/markdown.module.ts +++ b/src/platform/markdown/markdown.module.ts @@ -15,15 +15,5 @@ import { TdMarkdownComponent } from './markdown.component'; ], }) export class CovalentMarkdownModule { - /** - * @deprecated in 1.0.0-beta.3 - * - * Please use without calling forRoot() - */ - static forRoot(): ModuleWithProviders { - return { - ngModule: CovalentMarkdownModule, - providers: [], - }; - } + }