ng-universal-demo
ng-universal-demo copied to clipboard
onBootstrap
export function onBootstrap(appRef: ApplicationRef, transferState: TransferState) {
return () => {
appRef.isStable
.filter(stable => stable)
.first()
.subscribe(() => {
transferState.inject();
});
};
}
Is this garanteed?
I have a medium-size angular application and I'm trying to apply the state transfer but my state is being injected before the backend calls...
Anyone had this problem? What can I doing wrong? Thank you!