@angular/platform-server 14.1.0 → 14.2.0-next.1
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.
- package/esm2020/src/http.mjs +3 -3
- package/esm2020/src/location.mjs +3 -3
- package/esm2020/src/platform_state.mjs +3 -3
- package/esm2020/src/server.mjs +17 -8
- package/esm2020/src/server_events.mjs +3 -3
- package/esm2020/src/server_renderer.mjs +3 -3
- package/esm2020/src/styles_host.mjs +3 -3
- package/esm2020/src/transfer_state.mjs +23 -23
- package/esm2020/src/utils.mjs +9 -5
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/server.mjs +4 -4
- package/fesm2015/init.mjs +1 -1
- package/fesm2015/platform-server.mjs +91 -80
- package/fesm2015/platform-server.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2020/init.mjs +1 -1
- package/fesm2020/platform-server.mjs +91 -80
- package/fesm2020/platform-server.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/index.d.ts +12 -5
- package/init/index.d.ts +1 -1
- package/package.json +7 -7
- package/testing/index.d.ts +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.
|
|
2
|
+
* @license Angular v14.2.0-next.1
|
|
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, Injector, Optional, ViewEncapsulation, RendererStyleFlags2, PLATFORM_ID, PLATFORM_INITIALIZER, ɵALLOW_MULTIPLE_PLATFORMS, RendererFactory2, NgZone, Testability, ɵTESTABILITY,
|
|
9
|
+
import { Injectable, Inject, InjectionToken, Injector, Optional, ViewEncapsulation, RendererStyleFlags2, APP_ID, NgModule, PLATFORM_ID, PLATFORM_INITIALIZER, ɵALLOW_MULTIPLE_PLATFORMS, RendererFactory2, NgZone, Testability, ɵTESTABILITY, ɵsetDocument, createPlatformFactory, platformCore, ApplicationRef, ɵisPromise, importProvidersFrom, ɵinternalCreateApplication, Version } from '@angular/core';
|
|
10
10
|
import * as i1 from '@angular/platform-browser';
|
|
11
|
-
import { ɵBrowserDomAdapter, ɵflattenStyles, ɵNAMESPACE_URIS, ɵshimContentAttribute, ɵshimHostAttribute, ɵSharedStylesHost, ɵTRANSITION_ID,
|
|
11
|
+
import { ɵBrowserDomAdapter, ɵflattenStyles, ɵNAMESPACE_URIS, ɵshimContentAttribute, ɵshimHostAttribute, ɵSharedStylesHost, ɵTRANSITION_ID, TransferState, ɵescapeHtml, EVENT_MANAGER_PLUGINS, BrowserModule } from '@angular/platform-browser';
|
|
12
12
|
import * as domino from 'domino';
|
|
13
13
|
import { ɵAnimationEngine } from '@angular/animations/browser';
|
|
14
14
|
import { ɵHttpInterceptingHandler, HttpHandler, HttpBackend, HttpClientModule } from '@angular/common/http';
|
|
@@ -136,9 +136,9 @@ class PlatformState {
|
|
|
136
136
|
return this._doc;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
PlatformState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
140
|
-
PlatformState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
139
|
+
PlatformState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
+
PlatformState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PlatformState });
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: PlatformState, decorators: [{
|
|
142
142
|
type: Injectable
|
|
143
143
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
144
144
|
type: Inject,
|
|
@@ -180,9 +180,9 @@ class ServerXhr {
|
|
|
180
180
|
return new xhr2.XMLHttpRequest();
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
ServerXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
184
|
-
ServerXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
183
|
+
ServerXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
184
|
+
ServerXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerXhr });
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerXhr, decorators: [{
|
|
186
186
|
type: Injectable
|
|
187
187
|
}] });
|
|
188
188
|
class ZoneMacroTaskWrapper {
|
|
@@ -386,9 +386,9 @@ class ServerPlatformLocation {
|
|
|
386
386
|
return undefined;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
ServerPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
390
|
-
ServerPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
389
|
+
ServerPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
390
|
+
ServerPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerPlatformLocation });
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerPlatformLocation, decorators: [{
|
|
392
392
|
type: Injectable
|
|
393
393
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
394
394
|
type: Inject,
|
|
@@ -430,9 +430,9 @@ class ServerEventManagerPlugin /* extends EventManagerPlugin which is private */
|
|
|
430
430
|
return this.addEventListener(target, eventName, handler);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
ServerEventManagerPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
434
|
-
ServerEventManagerPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
433
|
+
ServerEventManagerPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
434
|
+
ServerEventManagerPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */ });
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerEventManagerPlugin /* extends EventManagerPlugin which is private */, decorators: [{
|
|
436
436
|
type: Injectable
|
|
437
437
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
438
438
|
type: Inject,
|
|
@@ -485,9 +485,9 @@ class ServerRendererFactory2 {
|
|
|
485
485
|
begin() { }
|
|
486
486
|
end() { }
|
|
487
487
|
}
|
|
488
|
-
ServerRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
489
|
-
ServerRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
488
|
+
ServerRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerRendererFactory2, deps: [{ token: i1.EventManager }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i1.ɵSharedStylesHost }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
489
|
+
ServerRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerRendererFactory2 });
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerRendererFactory2, decorators: [{
|
|
491
491
|
type: Injectable
|
|
492
492
|
}], ctorParameters: function () { return [{ type: i1.EventManager }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
493
493
|
type: Inject,
|
|
@@ -747,9 +747,9 @@ class ServerStylesHost extends ɵSharedStylesHost {
|
|
|
747
747
|
this._styleNodes.forEach(styleNode => styleNode.remove());
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
ServerStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
751
|
-
ServerStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
750
|
+
ServerStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerStylesHost, deps: [{ token: DOCUMENT }, { token: ɵTRANSITION_ID, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
751
|
+
ServerStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerStylesHost });
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerStylesHost, decorators: [{
|
|
753
753
|
type: Injectable
|
|
754
754
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
755
755
|
type: Inject,
|
|
@@ -761,6 +761,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
761
761
|
args: [ɵTRANSITION_ID]
|
|
762
762
|
}] }]; } });
|
|
763
763
|
|
|
764
|
+
/**
|
|
765
|
+
* @license
|
|
766
|
+
* Copyright Google LLC All Rights Reserved.
|
|
767
|
+
*
|
|
768
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
769
|
+
* found in the LICENSE file at https://angular.io/license
|
|
770
|
+
*/
|
|
771
|
+
const TRANSFER_STATE_SERIALIZATION_PROVIDERS = [{
|
|
772
|
+
provide: BEFORE_APP_SERIALIZED,
|
|
773
|
+
useFactory: serializeTransferStateFactory,
|
|
774
|
+
deps: [DOCUMENT, APP_ID, TransferState],
|
|
775
|
+
multi: true,
|
|
776
|
+
}];
|
|
777
|
+
function serializeTransferStateFactory(doc, appId, transferStore) {
|
|
778
|
+
return () => {
|
|
779
|
+
if (transferStore.isEmpty) {
|
|
780
|
+
// The state is empty, nothing to transfer,
|
|
781
|
+
// avoid creating an extra `<script>` tag in this case.
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
const script = doc.createElement('script');
|
|
785
|
+
script.id = appId + '-state';
|
|
786
|
+
script.setAttribute('type', 'application/json');
|
|
787
|
+
script.textContent = ɵescapeHtml(transferStore.toJson());
|
|
788
|
+
doc.body.appendChild(script);
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* NgModule to install on the server side while using the `TransferState` to transfer state from
|
|
793
|
+
* server to client.
|
|
794
|
+
*
|
|
795
|
+
* Note: this module is not needed if the `renderApplication` function is used.
|
|
796
|
+
* The `renderApplication` makes all providers from this module available in the application.
|
|
797
|
+
*
|
|
798
|
+
* @publicApi
|
|
799
|
+
* @deprecated no longer needed, you can inject the `TransferState` in an app without providing
|
|
800
|
+
* this module.
|
|
801
|
+
*/
|
|
802
|
+
class ServerTransferStateModule {
|
|
803
|
+
}
|
|
804
|
+
ServerTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
805
|
+
ServerTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerTransferStateModule });
|
|
806
|
+
ServerTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerTransferStateModule });
|
|
807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerTransferStateModule, decorators: [{
|
|
808
|
+
type: NgModule,
|
|
809
|
+
args: [{}]
|
|
810
|
+
}] });
|
|
811
|
+
|
|
764
812
|
/**
|
|
765
813
|
* @license
|
|
766
814
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -806,21 +854,23 @@ const SERVER_RENDER_PROVIDERS = [
|
|
|
806
854
|
*/
|
|
807
855
|
class ServerModule {
|
|
808
856
|
}
|
|
809
|
-
ServerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
810
|
-
ServerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
811
|
-
ServerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
857
|
+
ServerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
858
|
+
ServerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] });
|
|
859
|
+
ServerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerModule, providers: [
|
|
860
|
+
TRANSFER_STATE_SERIALIZATION_PROVIDERS,
|
|
812
861
|
SERVER_RENDER_PROVIDERS,
|
|
813
862
|
SERVER_HTTP_PROVIDERS,
|
|
814
863
|
{ provide: Testability, useValue: null },
|
|
815
864
|
{ provide: ɵTESTABILITY, useValue: null },
|
|
816
865
|
{ provide: ViewportScroller, useClass: ɵNullViewportScroller },
|
|
817
866
|
], imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] });
|
|
818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: ServerModule, decorators: [{
|
|
819
868
|
type: NgModule,
|
|
820
869
|
args: [{
|
|
821
870
|
exports: [BrowserModule],
|
|
822
871
|
imports: [HttpClientModule, NoopAnimationsModule],
|
|
823
872
|
providers: [
|
|
873
|
+
TRANSFER_STATE_SERIALIZATION_PROVIDERS,
|
|
824
874
|
SERVER_RENDER_PROVIDERS,
|
|
825
875
|
SERVER_HTTP_PROVIDERS,
|
|
826
876
|
{ provide: Testability, useValue: null },
|
|
@@ -830,9 +880,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
830
880
|
}]
|
|
831
881
|
}] });
|
|
832
882
|
function _document(injector) {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
883
|
+
const config = injector.get(INITIAL_CONFIG, null);
|
|
884
|
+
let document;
|
|
885
|
+
if (config && config.document) {
|
|
886
|
+
document = typeof config.document === 'string' ? parseDocument(config.document, config.url) :
|
|
887
|
+
config.document;
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
document = ɵgetDOM().createHtmlDocument();
|
|
891
|
+
}
|
|
836
892
|
// Tell ivy about the global document
|
|
837
893
|
ɵsetDocument(document);
|
|
838
894
|
return document;
|
|
@@ -848,54 +904,6 @@ const platformServer = createPlatformFactory(platformCore, 'server', INTERNAL_SE
|
|
|
848
904
|
*/
|
|
849
905
|
const platformDynamicServer = createPlatformFactory(ɵplatformCoreDynamic, 'serverDynamic', INTERNAL_SERVER_PLATFORM_PROVIDERS);
|
|
850
906
|
|
|
851
|
-
/**
|
|
852
|
-
* @license
|
|
853
|
-
* Copyright Google LLC All Rights Reserved.
|
|
854
|
-
*
|
|
855
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
856
|
-
* found in the LICENSE file at https://angular.io/license
|
|
857
|
-
*/
|
|
858
|
-
function serializeTransferStateFactory(doc, appId, transferStore) {
|
|
859
|
-
return () => {
|
|
860
|
-
const script = doc.createElement('script');
|
|
861
|
-
script.id = appId + '-state';
|
|
862
|
-
script.setAttribute('type', 'application/json');
|
|
863
|
-
script.textContent = ɵescapeHtml(transferStore.toJson());
|
|
864
|
-
doc.body.appendChild(script);
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* NgModule to install on the server side while using the `TransferState` to transfer state from
|
|
869
|
-
* server to client.
|
|
870
|
-
*
|
|
871
|
-
* @publicApi
|
|
872
|
-
*/
|
|
873
|
-
class ServerTransferStateModule {
|
|
874
|
-
}
|
|
875
|
-
ServerTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
876
|
-
ServerTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: ServerTransferStateModule });
|
|
877
|
-
ServerTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ServerTransferStateModule, providers: [
|
|
878
|
-
TransferState, {
|
|
879
|
-
provide: BEFORE_APP_SERIALIZED,
|
|
880
|
-
useFactory: serializeTransferStateFactory,
|
|
881
|
-
deps: [DOCUMENT, APP_ID, TransferState],
|
|
882
|
-
multi: true,
|
|
883
|
-
}
|
|
884
|
-
] });
|
|
885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ServerTransferStateModule, decorators: [{
|
|
886
|
-
type: NgModule,
|
|
887
|
-
args: [{
|
|
888
|
-
providers: [
|
|
889
|
-
TransferState, {
|
|
890
|
-
provide: BEFORE_APP_SERIALIZED,
|
|
891
|
-
useFactory: serializeTransferStateFactory,
|
|
892
|
-
deps: [DOCUMENT, APP_ID, TransferState],
|
|
893
|
-
multi: true,
|
|
894
|
-
}
|
|
895
|
-
]
|
|
896
|
-
}]
|
|
897
|
-
}] });
|
|
898
|
-
|
|
899
907
|
/**
|
|
900
908
|
* @license
|
|
901
909
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -964,7 +972,8 @@ the server-rendered app can be properly bootstrapped into a client app.`);
|
|
|
964
972
|
/**
|
|
965
973
|
* Renders a Module to string.
|
|
966
974
|
*
|
|
967
|
-
* `document` is the
|
|
975
|
+
* `document` is the document of the page to render, either as an HTML string or
|
|
976
|
+
* as a reference to the `document` instance.
|
|
968
977
|
* `url` is the URL for the current render request.
|
|
969
978
|
* `extraProviders` are the platform level providers for the current render request.
|
|
970
979
|
*
|
|
@@ -996,7 +1005,8 @@ function renderModule(module, options) {
|
|
|
996
1005
|
* - `appId` - a string identifier of this application. The appId is used to prefix all
|
|
997
1006
|
* server-generated stylings and state keys of the application in TransferState
|
|
998
1007
|
* use-cases.
|
|
999
|
-
* - `document` - the
|
|
1008
|
+
* - `document` - the document of the page to render, either as an HTML string or
|
|
1009
|
+
* as a reference to the `document` instance.
|
|
1000
1010
|
* - `url` - the URL for the current render request.
|
|
1001
1011
|
* - `providers` - set of application level providers for the current render request.
|
|
1002
1012
|
* - `platformProviders` - the platform level providers for the current render request.
|
|
@@ -1011,9 +1021,10 @@ function renderApplication(rootComponent, options) {
|
|
|
1011
1021
|
const appProviders = [
|
|
1012
1022
|
importProvidersFrom(BrowserModule.withServerTransition({ appId })),
|
|
1013
1023
|
importProvidersFrom(ServerModule),
|
|
1024
|
+
...TRANSFER_STATE_SERIALIZATION_PROVIDERS,
|
|
1014
1025
|
...(options.providers ?? []),
|
|
1015
1026
|
];
|
|
1016
|
-
return _render(platform,
|
|
1027
|
+
return _render(platform, ɵinternalCreateApplication({ rootComponent, appProviders }));
|
|
1017
1028
|
}
|
|
1018
1029
|
/**
|
|
1019
1030
|
* Renders a {@link NgModuleFactory} to string.
|
|
@@ -1052,7 +1063,7 @@ function renderModuleFactory(moduleFactory, options) {
|
|
|
1052
1063
|
/**
|
|
1053
1064
|
* @publicApi
|
|
1054
1065
|
*/
|
|
1055
|
-
const VERSION = new Version('14.
|
|
1066
|
+
const VERSION = new Version('14.2.0-next.1');
|
|
1056
1067
|
|
|
1057
1068
|
/**
|
|
1058
1069
|
* @license
|