A key value store that is transferred from the application on the server side to the application on the client side.
type TransferState = TransferStateFromCore;
TransferState is available as an injectable token. On the client, just inject this token using DI and use it, it will be lazily initialized. On the server it's already included if
renderApplication function is used. Otherwise, import the
ServerTransferStateModule module to make the
The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only boolean, number, string, null and non-class objects will be serialized and deserialized in a non-lossy manner.
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.