Skip to content

Commit 997505d

Browse files
committed
Updated Angular demo to use OPFS.
1 parent 319e403 commit 997505d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

demos/angular-supabase-todolist/src/app/powersync.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
PowerSyncDatabase,
1010
Schema,
1111
Table,
12-
WASQLiteOpenFactory
12+
WASQLiteOpenFactory,
13+
WASQLiteVFS
1314
} from '@powersync/web';
1415

1516
export interface ListRecord {
@@ -66,14 +67,15 @@ export class PowerSyncService {
6667
constructor() {
6768
const factory = new WASQLiteOpenFactory({
6869
dbFilename: 'test.db',
69-
70+
vfs: WASQLiteVFS.OPFSCoopSyncVFS,
7071
// Specify the path to the worker script
7172
worker: 'assets/@powersync/worker/WASQLiteDB.umd.js'
7273
});
7374

7475
this.db = new PowerSyncDatabase({
7576
schema: AppSchema,
7677
database: factory,
78+
7779
sync: {
7880
// Specify the path to the worker script
7981
worker: 'assets/@powersync/worker/SharedSyncImplementation.umd.js'

0 commit comments

Comments
 (0)