-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using with Ionic 3 Angular / Typescript Project #11
Comments
If you want to take a look at the couchbaselabs/cordova-couchbase wrapper, it is here: |
@clariontools I wasn't aware of nraboy's Couchbase-Lite-PhonGap-Plugin wrapper. He is wrapping over the standard REST API, so outside of his external API shape the wrapper guts would be completely different for this project. I wrote a simple wrapper for the main project I use this plugin with. I have added a basic version of it to the repo here it depends on a global instance of lodash fyi, but that is easily changed to an import which would be more standard. the cbl.ts is setup to wrap around a single database, so usage would be
|
Thanks I got pretty far with that, but need more time to integrate properly with Ionic 3. |
Cool let me know how I can help
|
It occurred to me that to properly support ionic3 the Promise/RxJS/Lodash wrapping should all happen inside the Typescript wrapper (instead of the cordova www api) so the library dependencies could be imported and injected normally instead of relying on global variables. Eventually the typescript wrapper should be merged into ionic-native itself |
That is a good point and while I really wanted to see how this would perform with Ionic 3, I started to realize that I do not have the time to do a proper integration atm. Since Ionic is quite a popular development framework, I suspect there would be a lot of interest in your approach. Maybe you could get nraboy to write a blog post about (and possibly contribute to) it since he has written many others over the past few years? |
I wasn't expecting this plugin would be a simple plugin add for an Ionic 3 Angular / Typescript project. This may not even be on your radar, but it was something that I am currently evaluating. The current couchbaselabs/Couchbase-Lite-PhoneGap-Plugin is a bit weak by itself with Ionic 3. However, nraboy created couchbaselabs/cordova-couchbase which provides a JavaScript / TypeScript wrapper for the official phonegap plugin. I think it would be fairly easy to create a similar JS / TypeScript wrapper for the cordova-plugin-couchbase-lite plugin using what nraboy did as a starting point. My question is if this is a good approach or do you already have something similar that I just couldn't find?
If this is a good way to go please let me know and give me a little guidance on how this would differ or be implemented compared to nraboy's couchbaselabs/cordova-couchbase wrapper?
The text was updated successfully, but these errors were encountered: