In version 10.0.0-next.8, we introduced absolute URL support for server-based HTTP requests, so long as the fully-resolved URL was provided in the initial config. However, doing so represents a breaking change for users who already have their own interceptors to model this functionality, since our logic executes before all interceptors fire on a request. See original PR #37071. Therefore, we introduce a flag to make this change consistent with v9 behavior, allowing users to opt in to this new behavior. This commit also fixes two issues with the previous implementation: 1. if the server was initiated with a relative URL, the absolute URL construction would fail because needed components were empty 2. if the user's absolute URL was on a port, the port would not be included PR Close #37539
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise<void>)[]>;
|
|
|
|
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
|
|
|
export declare interface PlatformConfig {
|
|
document?: string;
|
|
url?: string;
|
|
useAbsoluteUrl?: boolean;
|
|
}
|
|
|
|
export declare const platformDynamicServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
|
|
|
export declare const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
|
|
|
export declare class PlatformState {
|
|
constructor(_doc: any);
|
|
getDocument(): any;
|
|
renderToString(): string;
|
|
}
|
|
|
|
export declare function renderModule<T>(module: Type<T>, options: {
|
|
document?: string;
|
|
url?: string;
|
|
extraProviders?: StaticProvider[];
|
|
}): Promise<string>;
|
|
|
|
export declare function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: {
|
|
document?: string;
|
|
url?: string;
|
|
extraProviders?: StaticProvider[];
|
|
}): Promise<string>;
|
|
|
|
export declare class ServerModule {
|
|
}
|
|
|
|
export declare class ServerTransferStateModule {
|
|
}
|
|
|
|
export declare const VERSION: Version;
|