Skip to content

Commit

Permalink
feat(platform-server): rename provideServerSupport to `provideServe…
Browse files Browse the repository at this point in the history
…rRendering` (#49678)

This commit renames `provideServerSupport` to `provideServerRendering`.

PR Close #49678
  • Loading branch information
alan-agius4 authored and dylhunn committed Apr 3, 2023
1 parent de6dc5f commit 7870fb0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion goldens/public-api/platform-server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class PlatformState {
}

// @public
export function provideServerSupport(): EnvironmentProviders;
export function provideServerRendering(): EnvironmentProviders;

// @public
export function renderApplication<T>(bootstrap: () => Promise<ApplicationRef>, options: {
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-server/src/platform-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

export {PlatformState} from './platform_state';
export {provideServerSupport} from './provide_server';
export {provideServerRendering} from './provide_server';
export {platformDynamicServer, platformServer, ServerModule} from './server';
export {BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformConfig} from './tokens';
export {ServerTransferStateModule} from './transfer_state';
Expand Down
4 changes: 2 additions & 2 deletions packages/platform-server/src/provide_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import {PLATFORM_SERVER_PROVIDERS} from './server';
* Basic example of how you can add server support to your application:
* ```ts
* bootstrapApplication(AppComponent, {
* providers: [provideServerSupport()]
* providers: [provideServerRendering()]
* });
* ```
*
* @publicApi
* @returns A set of providers to setup the server.
*/
export function provideServerSupport(): EnvironmentProviders {
export function provideServerRendering(): EnvironmentProviders {
return makeEnvironmentProviders([
provideHttpClient(withInterceptorsFromDi()),
provideNoopAnimations(),
Expand Down
4 changes: 2 additions & 2 deletions packages/platform-server/test/hydration_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {bootstrapApplication} from '@angular/platform-browser';
import {provideRouter, RouterOutlet, Routes} from '@angular/router';
import {first} from 'rxjs/operators';

import {provideServerSupport} from '../public_api';
import {provideServerRendering} from '../public_api';
import {renderApplication} from '../src/utils';

/**
Expand Down Expand Up @@ -219,7 +219,7 @@ describe('platform-server integration', () => {
const defaultHtml = '<html><head></head><body><app></app></body></html>';
const providers = [
...(envProviders ?? []),
provideServerSupport(),
provideServerRendering(),
provideHydrationSupport(),
];

Expand Down
4 changes: 2 additions & 2 deletions packages/platform-server/test/integration_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {ApplicationConfig, ApplicationRef, Component, destroyPlatform, Environme
import {InitialRenderPendingTasks} from '@angular/core/src/initial_render_pending_tasks';
import {TestBed, waitForAsync} from '@angular/core/testing';
import {bootstrapApplication, BrowserModule, Title} from '@angular/platform-browser';
import {BEFORE_APP_SERIALIZED, INITIAL_CONFIG, platformDynamicServer, PlatformState, provideServerSupport, renderModule, ServerModule} from '@angular/platform-server';
import {BEFORE_APP_SERIALIZED, INITIAL_CONFIG, platformDynamicServer, PlatformState, provideServerRendering, renderModule, ServerModule} from '@angular/platform-server';
import {provideRouter, RouterOutlet, Routes} from '@angular/router';
import {Observable} from 'rxjs';
import {first} from 'rxjs/operators';
Expand All @@ -23,7 +23,7 @@ import {renderApplication, SERVER_CONTEXT} from '../src/utils';

const APP_CONFIG: ApplicationConfig = {
providers: [
provideServerSupport(),
provideServerRendering(),
]
};

Expand Down

0 comments on commit 7870fb0

Please sign in to comment.