capacitor-community / sqlite

Community plugin for native & electron SQLite databases
MIT License
426 stars 104 forks source link

Request: Add examples for angular and sqlite without Ionic. #499

Closed DannyBoyNg closed 3 months ago

DannyBoyNg commented 4 months ago

Could you add examples for angular and sqlite, but without using Ionic. Most of your examples use Ionic and I would like to see examples without Ionic. I would like to see an example specifically for web. I can get the mobile and sqlite working without Ionic but web is a huge pain to figure out.

jepiqueau commented 4 months ago

@DannyBoyNg which framework

DannyBoyNg commented 4 months ago

Angular

jepiqueau commented 4 months ago

@DannyBoyNg i do not know what is the issue

When all is done

For Web

For iOS -npx cap open iox

For Android -npx cap open android

That is it

DannyBoyNg commented 4 months ago

I followed your instructions and the code works fine for android and ios but for web I always get runtime errors.

2024-01-15 160400

The above error I fixed by copying the files in "SqliteTest\node_modules\jeep-sqlite\dist\esm" to "SqliteTest\.angular\cache\17.0.10\vite\deps". After fixing this error I get a different error:

2024-01-15 161219

2024-01-15 161316

I can't figure out how to fix these errors. Could you help. I tried it in Chrome and Firefox but I get the same result.

jepiqueau commented 3 months ago

@DannyBoyNg Can you share your app on github

jepiqueau commented 3 months ago

@DannyBoyNg see example test-angular-sqlite-app hope this will be helpful

DannyBoyNg commented 3 months ago

Thank you for the examples @jepiqueau. I'll look into it soon.