@angular/platform-server 16.0.0-next.2 → 16.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.2
2
+ * @license Angular v16.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -23,10 +23,10 @@ const platformServerTesting = createPlatformFactory(ɵplatformCoreDynamicTesting
23
23
  */
24
24
  class ServerTestingModule {
25
25
  }
26
- ServerTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
27
- ServerTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] });
28
- ServerTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, providers: ɵSERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, decorators: [{
26
+ ServerTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
27
+ ServerTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] });
28
+ ServerTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTestingModule, providers: ɵSERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTestingModule, decorators: [{
30
30
  type: NgModule,
31
31
  args: [{
32
32
  exports: [BrowserDynamicTestingModule],
package/fesm2020/init.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.2
2
+ * @license Angular v16.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.2
2
+ * @license Angular v16.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { ɵsetRootDomAdapter, DOCUMENT, XhrFactory, PlatformLocation, ɵgetDOM, ɵPLATFORM_SERVER_ID, ViewportScroller, ɵNullViewportScroller } from '@angular/common';
8
8
  import * as i0 from '@angular/core';
9
- import { Injectable, Inject, InjectionToken, inject, EnvironmentInjector, Optional, ViewEncapsulation, RendererStyleFlags2, APP_ID, ɵescapeTransferStateContent, NgModule, Injector, PLATFORM_ID, PLATFORM_INITIALIZER, ɵALLOW_MULTIPLE_PLATFORMS, RendererFactory2, NgZone, Testability, ɵTESTABILITY, ɵsetDocument, createPlatformFactory, platformCore, Renderer2, ApplicationRef, ɵIS_HYDRATION_FEATURE_ENABLED, ɵannotateForHydration, ɵisPromise, importProvidersFrom, ɵinternalCreateApplication, ɵgetComponentDef, Version } from '@angular/core';
9
+ import { Injectable, Inject, InjectionToken, inject, EnvironmentInjector, Optional, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵescapeTransferStateContent, NgModule, Injector, PLATFORM_ID, PLATFORM_INITIALIZER, ɵALLOW_MULTIPLE_PLATFORMS, RendererFactory2, NgZone, Testability, ɵTESTABILITY, ɵsetDocument, createPlatformFactory, platformCore, makeEnvironmentProviders, Renderer2, ApplicationRef, ɵIS_HYDRATION_FEATURE_ENABLED, ɵannotateForHydration, ɵisPromise, importProvidersFrom, ɵinternalCreateApplication, ɵgetComponentDef, Version } from '@angular/core';
10
10
  import * as i1 from '@angular/platform-browser';
11
- import { ɵBrowserDomAdapter, ɵshimStyles, ɵNAMESPACE_URIS, ɵshimContentAttribute, ɵshimHostAttribute, ɵSharedStylesHost, ɵTRANSITION_ID, TransferState, EVENT_MANAGER_PLUGINS, BrowserModule } from '@angular/platform-browser';
11
+ import { ɵBrowserDomAdapter, ɵshimStyles, ɵNAMESPACE_URIS, ɵshimContentAttribute, ɵshimHostAttribute, ɵSharedStylesHost, TransferState, EVENT_MANAGER_PLUGINS, BrowserModule } from '@angular/platform-browser';
12
+ import { ɵHttpInterceptorHandler, HttpBackend, HttpHandler, HttpClientModule, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
13
+ import { ɵAnimationRendererFactory, NoopAnimationsModule, provideNoopAnimations } from '@angular/platform-browser/animations';
12
14
  import { ɵAnimationEngine } from '@angular/animations/browser';
13
- import { ɵHttpInterceptorHandler, HttpBackend, HttpHandler, HttpClientModule } from '@angular/common/http';
14
15
  import { ɵplatformCoreDynamic } from '@angular/platform-browser-dynamic';
15
- import { ɵAnimationRendererFactory, NoopAnimationsModule } from '@angular/platform-browser/animations';
16
16
  import { Observable, Subject } from 'rxjs';
17
17
  import * as xhr2 from 'xhr2';
18
18
  import * as url from 'url';
@@ -20085,9 +20085,9 @@ class PlatformState {
20085
20085
  return this._doc;
20086
20086
  }
20087
20087
  }
20088
- PlatformState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
20089
- PlatformState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PlatformState });
20090
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: PlatformState, decorators: [{
20088
+ PlatformState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
20089
+ PlatformState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PlatformState });
20090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PlatformState, decorators: [{
20091
20091
  type: Injectable
20092
20092
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
20093
20093
  type: Inject,
@@ -20115,9 +20115,9 @@ class ServerXhr {
20115
20115
  return new xhr2.XMLHttpRequest();
20116
20116
  }
20117
20117
  }
20118
- ServerXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20119
- ServerXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerXhr });
20120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerXhr, decorators: [{
20118
+ ServerXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20119
+ ServerXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerXhr });
20120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerXhr, decorators: [{
20121
20121
  type: Injectable
20122
20122
  }] });
20123
20123
  class ZoneMacroTaskWrapper {
@@ -20313,9 +20313,9 @@ class ServerPlatformLocation {
20313
20313
  return undefined;
20314
20314
  }
20315
20315
  }
20316
- ServerPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
20317
- ServerPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerPlatformLocation });
20318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerPlatformLocation, decorators: [{
20316
+ ServerPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
20317
+ ServerPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerPlatformLocation });
20318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerPlatformLocation, decorators: [{
20319
20319
  type: Injectable
20320
20320
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
20321
20321
  type: Inject,
@@ -20350,9 +20350,9 @@ class ServerEventManagerPlugin /* extends EventManagerPlugin which is private */
20350
20350
  return this.addEventListener(target, eventName, handler);
20351
20351
  }
20352
20352
  }
20353
- ServerEventManagerPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
20354
- ServerEventManagerPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */ });
20355
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, decorators: [{
20353
+ ServerEventManagerPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
20354
+ ServerEventManagerPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */ });
20355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, decorators: [{
20356
20356
  type: Injectable
20357
20357
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
20358
20358
  type: Inject,
@@ -20362,11 +20362,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2",
20362
20362
  const EMPTY_ARRAY = [];
20363
20363
  const DEFAULT_SCHEMA = new DomElementSchemaRegistry();
20364
20364
  class ServerRendererFactory2 {
20365
- constructor(eventManager, ngZone, document, sharedStylesHost) {
20365
+ constructor(eventManager, ngZone, document, sharedStylesHost, appId) {
20366
20366
  this.eventManager = eventManager;
20367
20367
  this.ngZone = ngZone;
20368
20368
  this.document = document;
20369
20369
  this.sharedStylesHost = sharedStylesHost;
20370
+ this.appId = appId;
20370
20371
  this.rendererByCompId = new Map();
20371
20372
  this.schema = DEFAULT_SCHEMA;
20372
20373
  this.defaultRenderer = new DefaultServerRenderer2(eventManager, document, ngZone, this.schema);
@@ -20379,7 +20380,7 @@ class ServerRendererFactory2 {
20379
20380
  case ViewEncapsulation.Emulated: {
20380
20381
  let renderer = this.rendererByCompId.get(type.id);
20381
20382
  if (!renderer) {
20382
- renderer = new EmulatedEncapsulationServerRenderer2(this.eventManager, this.document, this.ngZone, this.sharedStylesHost, this.schema, type);
20383
+ renderer = new EmulatedEncapsulationServerRenderer2(this.eventManager, this.document, this.ngZone, this.sharedStylesHost, this.schema, type, this.appId);
20383
20384
  this.rendererByCompId.set(type.id, renderer);
20384
20385
  }
20385
20386
  renderer.applyToHost(element);
@@ -20398,14 +20399,17 @@ class ServerRendererFactory2 {
20398
20399
  begin() { }
20399
20400
  end() { }
20400
20401
  }
20401
- ServerRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerRendererFactory2, deps: [{ token: i1.EventManager }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i1.ɵSharedStylesHost }], target: i0.ɵɵFactoryTarget.Injectable });
20402
- ServerRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerRendererFactory2 });
20403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerRendererFactory2, decorators: [{
20402
+ ServerRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerRendererFactory2, deps: [{ token: i1.EventManager }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i1.ɵSharedStylesHost }, { token: APP_ID }], target: i0.ɵɵFactoryTarget.Injectable });
20403
+ ServerRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerRendererFactory2 });
20404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerRendererFactory2, decorators: [{
20404
20405
  type: Injectable
20405
- }], ctorParameters: function () { return [{ type: i1.EventManager }, { type: i0.NgZone }, { type: undefined, decorators: [{
20406
+ }], ctorParameters: function () { return [{ type: i1.EventManager }, { type: i0.NgZone }, { type: Document, decorators: [{
20406
20407
  type: Inject,
20407
20408
  args: [DOCUMENT]
20408
- }] }, { type: i1.ɵSharedStylesHost }]; } });
20409
+ }] }, { type: i1.ɵSharedStylesHost }, { type: undefined, decorators: [{
20410
+ type: Inject,
20411
+ args: [APP_ID]
20412
+ }] }]; } });
20409
20413
  class DefaultServerRenderer2 {
20410
20414
  constructor(eventManager, document, ngZone, schema) {
20411
20415
  this.eventManager = eventManager;
@@ -20567,15 +20571,14 @@ function isTemplateNode(node) {
20567
20571
  return node.tagName === 'TEMPLATE' && node.content !== undefined;
20568
20572
  }
20569
20573
  class EmulatedEncapsulationServerRenderer2 extends DefaultServerRenderer2 {
20570
- constructor(eventManager, document, ngZone, sharedStylesHost, schema, component) {
20574
+ constructor(eventManager, document, ngZone, sharedStylesHost, schema, component, appId) {
20571
20575
  super(eventManager, document, ngZone, schema);
20572
20576
  this.component = component;
20573
- // Add a 's' prefix to style attributes to indicate server.
20574
- const componentId = 's' + component.id;
20575
- const styles = ɵshimStyles(componentId, component.styles);
20577
+ const componentShortId = appId + '-' + this.component.id;
20578
+ const styles = ɵshimStyles(componentShortId, this.component.styles);
20576
20579
  sharedStylesHost.addStyles(styles);
20577
- this.contentAttr = ɵshimContentAttribute(componentId);
20578
- this.hostAttr = ɵshimHostAttribute(componentId);
20580
+ this.contentAttr = ɵshimContentAttribute(componentShortId);
20581
+ this.hostAttr = ɵshimHostAttribute(componentShortId);
20579
20582
  }
20580
20583
  applyToHost(element) {
20581
20584
  super.setAttribute(element, this.hostAttr, '');
@@ -20625,10 +20628,9 @@ function _writeStyleAttribute(element, styleMap) {
20625
20628
  }
20626
20629
 
20627
20630
  class ServerStylesHost extends ɵSharedStylesHost {
20628
- constructor(doc, transitionId) {
20631
+ constructor(doc, appId) {
20629
20632
  super();
20630
- this.doc = doc;
20631
- this.transitionId = transitionId;
20633
+ this.appId = appId;
20632
20634
  this.head = null;
20633
20635
  this._styleNodes = new Set();
20634
20636
  this.head = doc.getElementsByTagName('head')[0];
@@ -20637,8 +20639,8 @@ class ServerStylesHost extends ɵSharedStylesHost {
20637
20639
  const adapter = ɵgetDOM();
20638
20640
  const el = adapter.createElement('style');
20639
20641
  el.textContent = style;
20640
- if (!!this.transitionId) {
20641
- el.setAttribute('ng-transition', this.transitionId);
20642
+ if (!!this.appId) {
20643
+ el.setAttribute('ng-app', this.appId);
20642
20644
  }
20643
20645
  this.head.appendChild(el);
20644
20646
  this._styleNodes.add(el);
@@ -20649,18 +20651,16 @@ class ServerStylesHost extends ɵSharedStylesHost {
20649
20651
  super.ngOnDestroy();
20650
20652
  }
20651
20653
  }
20652
- ServerStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerStylesHost, deps: [{ token: DOCUMENT }, { token: ɵTRANSITION_ID, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
20653
- ServerStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerStylesHost });
20654
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerStylesHost, decorators: [{
20654
+ ServerStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }], target: i0.ɵɵFactoryTarget.Injectable });
20655
+ ServerStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerStylesHost });
20656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerStylesHost, decorators: [{
20655
20657
  type: Injectable
20656
20658
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
20657
20659
  type: Inject,
20658
20660
  args: [DOCUMENT]
20659
20661
  }] }, { type: undefined, decorators: [{
20660
- type: Optional
20661
- }, {
20662
20662
  type: Inject,
20663
- args: [ɵTRANSITION_ID]
20663
+ args: [APP_ID]
20664
20664
  }] }]; } });
20665
20665
 
20666
20666
  const TRANSFER_STATE_SERIALIZATION_PROVIDERS = [{
@@ -20702,10 +20702,10 @@ function serializeTransferStateFactory(doc, appId, transferStore) {
20702
20702
  */
20703
20703
  class ServerTransferStateModule {
20704
20704
  }
20705
- ServerTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20706
- ServerTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTransferStateModule });
20707
- ServerTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTransferStateModule });
20708
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTransferStateModule, decorators: [{
20705
+ ServerTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20706
+ ServerTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTransferStateModule });
20707
+ ServerTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTransferStateModule });
20708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerTransferStateModule, decorators: [{
20709
20709
  type: NgModule,
20710
20710
  args: [{}]
20711
20711
  }] });
@@ -20741,6 +20741,14 @@ const SERVER_RENDER_PROVIDERS = [
20741
20741
  { provide: ɵSharedStylesHost, useExisting: ServerStylesHost },
20742
20742
  { provide: EVENT_MANAGER_PLUGINS, multi: true, useClass: ServerEventManagerPlugin },
20743
20743
  ];
20744
+ const PLATFORM_SERVER_PROVIDERS = [
20745
+ TRANSFER_STATE_SERIALIZATION_PROVIDERS,
20746
+ SERVER_RENDER_PROVIDERS,
20747
+ SERVER_HTTP_PROVIDERS,
20748
+ { provide: Testability, useValue: null },
20749
+ { provide: ɵTESTABILITY, useValue: null },
20750
+ { provide: ViewportScroller, useClass: ɵNullViewportScroller },
20751
+ ];
20744
20752
  /**
20745
20753
  * The ng module for the server.
20746
20754
  *
@@ -20748,29 +20756,15 @@ const SERVER_RENDER_PROVIDERS = [
20748
20756
  */
20749
20757
  class ServerModule {
20750
20758
  }
20751
- ServerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20752
- ServerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] });
20753
- ServerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerModule, providers: [
20754
- TRANSFER_STATE_SERIALIZATION_PROVIDERS,
20755
- SERVER_RENDER_PROVIDERS,
20756
- SERVER_HTTP_PROVIDERS,
20757
- { provide: Testability, useValue: null },
20758
- { provide: ɵTESTABILITY, useValue: null },
20759
- { provide: ViewportScroller, useClass: ɵNullViewportScroller },
20760
- ], imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] });
20761
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerModule, decorators: [{
20759
+ ServerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20760
+ ServerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] });
20761
+ ServerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] });
20762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ServerModule, decorators: [{
20762
20763
  type: NgModule,
20763
20764
  args: [{
20764
20765
  exports: [BrowserModule],
20765
20766
  imports: [HttpClientModule, NoopAnimationsModule],
20766
- providers: [
20767
- TRANSFER_STATE_SERIALIZATION_PROVIDERS,
20768
- SERVER_RENDER_PROVIDERS,
20769
- SERVER_HTTP_PROVIDERS,
20770
- { provide: Testability, useValue: null },
20771
- { provide: ɵTESTABILITY, useValue: null },
20772
- { provide: ViewportScroller, useClass: ɵNullViewportScroller },
20773
- ],
20767
+ providers: PLATFORM_SERVER_PROVIDERS,
20774
20768
  }]
20775
20769
  }] });
20776
20770
  function _document(injector) {
@@ -20798,6 +20792,29 @@ const platformServer = createPlatformFactory(platformCore, 'server', INTERNAL_SE
20798
20792
  */
20799
20793
  const platformDynamicServer = createPlatformFactory(ɵplatformCoreDynamic, 'serverDynamic', INTERNAL_SERVER_PLATFORM_PROVIDERS);
20800
20794
 
20795
+ /**
20796
+ * Sets up providers necessary to enable server rendering functionality for the application.
20797
+ *
20798
+ * @usageNotes
20799
+ *
20800
+ * Basic example of how you can add server support to your application:
20801
+ * ```ts
20802
+ * bootstrapApplication(AppComponent, {
20803
+ * providers: [provideServerSupport()]
20804
+ * });
20805
+ * ```
20806
+ *
20807
+ * @publicApi
20808
+ * @returns A set of providers to setup the server.
20809
+ */
20810
+ function provideServerSupport() {
20811
+ return makeEnvironmentProviders([
20812
+ provideHttpClient(withInterceptorsFromDi()),
20813
+ provideNoopAnimations(),
20814
+ ...PLATFORM_SERVER_PROVIDERS,
20815
+ ]);
20816
+ }
20817
+
20801
20818
  function _getPlatform(platformFactory, options) {
20802
20819
  const extraProviders = options.platformProviders ?? [];
20803
20820
  return platformFactory([
@@ -20821,11 +20838,6 @@ function appendServerContextInfo(serverContext, applicationRef) {
20821
20838
  function _render(platform, bootstrapPromise) {
20822
20839
  return bootstrapPromise.then((moduleOrApplicationRef) => {
20823
20840
  const environmentInjector = moduleOrApplicationRef.injector;
20824
- const transitionId = environmentInjector.get(ɵTRANSITION_ID, null);
20825
- if (!transitionId) {
20826
- throw new Error(`renderModule[Factory]() requires the use of BrowserModule.withServerTransition() to ensure
20827
- the server-rendered app can be properly bootstrapped into a client app.`);
20828
- }
20829
20841
  const applicationRef = moduleOrApplicationRef instanceof ApplicationRef ?
20830
20842
  moduleOrApplicationRef :
20831
20843
  environmentInjector.get(ApplicationRef);
@@ -20936,7 +20948,7 @@ function isBootstrapFn(value) {
20936
20948
  /**
20937
20949
  * @publicApi
20938
20950
  */
20939
- const VERSION = new Version('16.0.0-next.2');
20951
+ const VERSION = new Version('16.0.0-next.3');
20940
20952
 
20941
20953
  /// <reference types="node" />
20942
20954
  // This file only reexports content of the `src` folder. Keep it that way.
@@ -20947,5 +20959,5 @@ const VERSION = new Version('16.0.0-next.2');
20947
20959
  * Generated bundle index. Do not edit.
20948
20960
  */
20949
20961
 
20950
- export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, ServerTransferStateModule, VERSION, platformDynamicServer, platformServer, renderApplication, renderModule, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, ServerRendererFactory2 as ɵServerRendererFactory2, setDomTypes as ɵsetDomTypes };
20962
+ export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, ServerTransferStateModule, VERSION, platformDynamicServer, platformServer, provideServerSupport, renderApplication, renderModule, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, ServerRendererFactory2 as ɵServerRendererFactory2, setDomTypes as ɵsetDomTypes };
20951
20963
  //# sourceMappingURL=platform-server.mjs.map