angular/packages/platform-server/src
Alan Agius 2fc5b70fce fix(platform-server): insert transfer state script before other script tags (#48868)
Previously, the state `script` was always appended as the last item in the `body` tag. This can result in the state not being available when the Angular application is bootstrap.
A workaround for this was to delay the bootstrapping of the application until by using the `DOMContentLoaded` event listener.

```ts
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);

document.addEventListener('DOMContentLoaded', bootstrap);
```

With this change the above workaround is no longer necessary as the state `script` tag is now added prior of any other `script` which guarantees that the state is present prior of the Angular application is bootstrapped.

PR Close #48868
2023-01-30 16:54:07 -08:00
..
domino_adapter.ts refactor(platform-server): use proper ESM-compatible import to domino (#48521) 2022-12-19 19:50:41 +00:00
http.ts refactor(http): introduce the functional interceptors API (#47502) 2022-10-06 19:02:45 +00:00
location.ts fix(common): cleanup location change listeners when the root view is removed (#40867) 2021-03-04 13:09:04 -08:00
platform-server.ts feat(platform-server): implement renderApplication function (#45785) 2022-04-29 17:18:54 -04:00
platform_state.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
private_export.ts refactor(platform-server): add a marker to specify how a page was rendered (#47103) 2022-09-12 19:05:48 -07:00
server.ts refactor(platform-server): remove Injector dependency for initDominoAdapter factory (#48231) 2022-11-28 09:12:35 -08:00
server_events.ts perf(core): minor improvements to listener instructions (#41807) 2021-04-30 14:14:00 -07:00
server_renderer.ts refactor(platform-browser): simplify flattenStyles method (#48293) 2022-12-02 11:36:13 -08:00
styles_host.ts refactor(platform-server): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
tokens.ts feat(platform-server): implement renderApplication function (#45785) 2022-04-29 17:18:54 -04:00
transfer_state.ts fix(platform-server): insert transfer state script before other script tags (#48868) 2023-01-30 16:54:07 -08:00
types.d.ts refactor(platform-server): switch from dynamic require to import statement (#43431) 2021-10-01 18:28:43 +00:00
utils.ts feat(core): introduce EnvironmentProviders wrapper type (#47669) 2022-10-07 14:03:13 -07:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00