If I understood right, the way how the ngCordova should be installed is the git clone to the /www/lib . So then, in the index.html, we should include the
(however, on the site it says to include the /lib/ngCordova/dist/ng-cordova.js , I don’t understand how they get the different folder name )
I’ve tried install it as cordova plugin:
Question:
Is that’s the correct way of installing the ng-cordova?
From the other point I’m trying to install the sqlite plugin.
However it’s not clear - should I somehow include the js of it in my index.html, or it would be included automatically ? Any of my tries to include or use it had not lead to the success. Evenmore, when I try to build the project for ios, I see the next:
As you see - it’s not able to find the plugins file.
Question:
What I’m doing wrong, how should I add the plugin to the project after I’ve added it as cordova plugin?
First you can download the ng-cordova using the custom build in ng-cordova website, there you can create your “version” of ng-cordova with just the parts you really want, if you just want the SQLitePlugin you can create a custom “version” that just bring the SQLitePlugin, this will make your app more lite and just with you really want.
After that you can add the ng-cordova file to your project a link it in your html page.
Then you need to install the plugin of the ng-cordova “plugins” you need, if you want to install the SQLitePlugin to use with ng-cordova you need to run this command: cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
Ok, let’s try from zero. Delete the your ng-cordova, and remove the sqlite plugin. Then create a new custom build with just the things you need in ng-cordova, then run the command to add again the sqlite plugin to your project, link you ng-cordova js file to you html and just try to run the ionic build ios and see if some error appears.
As ng-cordova is just a js script, I don’t think that I should remove it.
However, I’ve removed the old “cloned” version of course. Currently the only ng-cordova file is the custom build, which includes the sqlite plugin support.
Here is the video, which shows that the clean project builds well, but as soon as I would add the plugin - it started to fail.
That’s strange I never got this error before, I have a project here and I use the ng-cordova with sqlite, I run: ionic build ios and everything runs OK. What is your xcode version?
@dmitry You can run commands cordova? for example, cordova plugin ls
If you can and you send the error that is not recognized as ionic command, check your PATH, I spend my something and reinstall ionic, check the path and everything works ok.