angular/packages/platform-server
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
..
init refactor: update platform-server tests to work with ESM (#48521) 2022-12-19 19:50:43 +00:00
src fix(platform-server): insert transfer state script before other script tags (#48868) 2023-01-30 16:54:07 -08:00
test fix(platform-server): insert transfer state script before other script tags (#48868) 2023-01-30 16:54:07 -08:00
testing build: reformat BUILD files (#48181) 2022-11-22 21:22:34 +00:00
BUILD.bazel build: add missing dependencies to platform-server and tools/testing (#48521) 2022-12-19 19:50:43 +00:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): add support for Node.js version 18 (#47730) 2022-10-11 17:21:19 +00:00
PACKAGE.md docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00