mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
13b6bbd6a0
Add a dedicated error reference page for NG05703 (suspicious URL origin change during SSR) and update the error to use RuntimeError with a negative code so the error message automatically includes a link to the docs page in both dev and production builds. Update affected tests in url_spec.ts, platform_location_spec.ts, and integration_spec.ts to match the new NG05703-prefixed error message format. Fixes: #69667
100 lines
2.8 KiB
Markdown
100 lines
2.8 KiB
Markdown
## API Report File for "@angular/platform-server"
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
```ts
|
|
|
|
import { ApplicationRef } from '@angular/core';
|
|
import { BootstrapContext } from '@angular/platform-browser';
|
|
import { EnvironmentProviders } from '@angular/core';
|
|
import * as i0 from '@angular/core';
|
|
import * as i1 from '@angular/platform-browser';
|
|
import { InjectionToken } from '@angular/core';
|
|
import { PlatformRef } from '@angular/core';
|
|
import { Provider } from '@angular/core';
|
|
import { StaticProvider } from '@angular/core';
|
|
import { Type } from '@angular/core';
|
|
import { Version } from '@angular/core';
|
|
|
|
// @public
|
|
export const BEFORE_APP_SERIALIZED: InjectionToken<readonly (() => void | Promise<void>)[]>;
|
|
|
|
// @public
|
|
export const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
|
|
|
// @public
|
|
export interface PlatformConfig {
|
|
document?: string;
|
|
url?: string;
|
|
}
|
|
|
|
// @public
|
|
export function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef;
|
|
|
|
// @public
|
|
export class PlatformState {
|
|
constructor(_doc: any);
|
|
getDocument(): any;
|
|
renderToString(): string;
|
|
// (undocumented)
|
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformState, never>;
|
|
// (undocumented)
|
|
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformState>;
|
|
}
|
|
|
|
// @public
|
|
export function provideServerRendering(options?: {
|
|
maxResponseBodySize: number;
|
|
}): EnvironmentProviders;
|
|
|
|
// @public
|
|
export function renderApplication(bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>, options: {
|
|
document?: string | Document;
|
|
url?: string;
|
|
platformProviders?: Provider[];
|
|
allowedHosts?: Readonly<string>[];
|
|
}): Promise<string>;
|
|
|
|
// @public
|
|
export function renderModule<T>(moduleType: Type<T>, options: {
|
|
document?: string | Document;
|
|
url?: string;
|
|
extraProviders?: StaticProvider[];
|
|
allowedHosts?: Readonly<string>[];
|
|
}): Promise<string>;
|
|
|
|
// @public
|
|
export const enum RuntimeErrorCode {
|
|
// (undocumented)
|
|
DISABLED_DOM_EMULATION_IN_NON_BROWSER = 5704,
|
|
// (undocumented)
|
|
GET_COOKIE_NOT_IMPLEMENTED = 5700,
|
|
// (undocumented)
|
|
HOST_NOT_ALLOWED = 5706,
|
|
// (undocumented)
|
|
INVALID_URL = 5701,
|
|
// (undocumented)
|
|
PROTOCOL_RELATIVE_URL_NOT_ALLOWED = 5702,
|
|
// (undocumented)
|
|
SUSPICIOUS_URL_CHANGE_ORIGIN = -5703,
|
|
// (undocumented)
|
|
XHR_NOT_LOADED = 5705
|
|
}
|
|
|
|
// @public
|
|
export class ServerModule {
|
|
// (undocumented)
|
|
static ɵfac: i0.ɵɵFactoryDeclaration<ServerModule, never>;
|
|
// (undocumented)
|
|
static ɵinj: i0.ɵɵInjectorDeclaration<ServerModule>;
|
|
// (undocumented)
|
|
static ɵmod: i0.ɵɵNgModuleDeclaration<ServerModule, never, never, [typeof i1.BrowserModule]>;
|
|
}
|
|
|
|
// @public (undocumented)
|
|
export const VERSION: Version;
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
```
|