angular/packages/platform-server/test
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
..
BUILD.bazel refactor: update platform-server tests to work with ESM (#48521) 2022-12-19 19:50:43 +00:00
integration_spec.ts fix(platform-server): call onSerialize when state is empty (#47888) 2022-10-28 02:27:56 -07:00
server_styles_host_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
transfer_state_spec.ts fix(platform-server): insert transfer state script before other script tags (#48868) 2023-01-30 16:54:07 -08:00