Files
ng-eventually-refine-providers/examples/antd-app/src/utils/initNg.ts
T
2026-07-10 11:45:54 +02:00

18 lines
376 B
TypeScript

import { ng, init, Session } from "@ng-org/web";
import { initNg } from "@ng-org/orm";
export let session: Session | undefined;
init(
async (event: any) => {
session = event.session;
// The ORM needs to have access to ng,
// the interface to the engine running in WASM.
initNg(ng, session!);
},
true,
[],
);
export const getSession = () => session;