Skip to content

Commit d63e31c

Browse files
committed
refactor(@angular/ssr): remove deprecated provideServerRoutesConfig dev-preview API
`provideServerRouting` should be used instead.
1 parent e6be376 commit d63e31c

File tree

3 files changed

+0
-64
lines changed

3 files changed

+0
-64
lines changed

goldens/public-api/angular/ssr/index.api.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ export enum PrerenderFallback {
2626
Server = 0
2727
}
2828

29-
// @public @deprecated
30-
export function provideServerRoutesConfig(routes: ServerRoute[], options?: ServerRoutesConfigOptions): EnvironmentProviders;
31-
3229
// @public
3330
export function provideServerRouting(routes: ServerRoute[], ...features: ServerRoutesFeature<ServerRoutesFeatureKind>[]): EnvironmentProviders;
3431

@@ -69,11 +66,6 @@ export interface ServerRoutePrerenderWithParams extends Omit<ServerRoutePrerende
6966
getPrerenderParams: () => Promise<Record<string, string>[]>;
7067
}
7168

72-
// @public @deprecated
73-
export interface ServerRoutesConfigOptions {
74-
appShellRoute?: string;
75-
}
76-
7769
// @public
7870
export interface ServerRouteServer extends ServerRouteCommon {
7971
renderMode: RenderMode.Server;

packages/angular/ssr/public_api.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ export { createRequestHandler, type RequestHandlerFunction } from './src/handler
1414
export {
1515
PrerenderFallback,
1616
type ServerRoute,
17-
type ServerRoutesConfigOptions,
18-
provideServerRoutesConfig,
1917
provideServerRouting,
2018
withAppShell,
2119
RenderMode,

packages/angular/ssr/src/routes/route-config.ts

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -189,26 +189,6 @@ export type ServerRoute =
189189
| ServerRoutePrerenderWithParams
190190
| ServerRouteServer;
191191

192-
/**
193-
* Configuration options for server routes.
194-
*
195-
* This interface defines the optional settings available for configuring server routes
196-
* in the server-side environment, such as specifying a path to the app shell route.
197-
*
198-
*
199-
* @see {@link provideServerRouting}
200-
* @deprecated use `provideServerRouting`. This will be removed in version 20.
201-
*/
202-
203-
export interface ServerRoutesConfigOptions {
204-
/**
205-
* Defines the route to be used as the app shell, which serves as the main entry
206-
* point for the application. This route is often used to enable server-side rendering
207-
* of the application shell for requests that do not match any specific server route.
208-
*/
209-
appShellRoute?: string;
210-
}
211-
212192
/**
213193
* Configuration value for server routes configuration.
214194
* @internal
@@ -229,40 +209,6 @@ export interface ServerRoutesConfig {
229209
*/
230210
export const SERVER_ROUTES_CONFIG = new InjectionToken<ServerRoutesConfig>('SERVER_ROUTES_CONFIG');
231211

232-
/**
233-
* Sets up the necessary providers for configuring server routes.
234-
* This function accepts an array of server routes and optional configuration
235-
* options, returning an `EnvironmentProviders` object that encapsulates
236-
* the server routes and configuration settings.
237-
*
238-
* @param routes - An array of server routes to be provided.
239-
* @param options - (Optional) An object containing additional configuration options for server routes.
240-
* @returns An `EnvironmentProviders` instance with the server routes configuration.
241-
*
242-
* @see {@link ServerRoute}
243-
* @see {@link ServerRoutesConfigOptions}
244-
* @see {@link provideServerRouting}
245-
* @deprecated use `provideServerRouting`. This will be removed in version 20.
246-
* @developerPreview
247-
*/
248-
export function provideServerRoutesConfig(
249-
routes: ServerRoute[],
250-
options?: ServerRoutesConfigOptions,
251-
): EnvironmentProviders {
252-
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
253-
throw new Error(
254-
`The 'provideServerRoutesConfig' function should not be invoked within the browser portion of the application.`,
255-
);
256-
}
257-
258-
return makeEnvironmentProviders([
259-
{
260-
provide: SERVER_ROUTES_CONFIG,
261-
useValue: { routes, ...options },
262-
},
263-
]);
264-
}
265-
266212
/**
267213
* Sets up the necessary providers for configuring server routes.
268214
* This function accepts an array of server routes and optional configuration

0 commit comments

Comments
 (0)