Hello, Just like to confirm, if we are using ng-cordova.js, then no need to include cordova.js in our app is it correct?
No, you still need cordova.js.
NG-cordova is just an angular service that lets you have easier access to cordova’s plugins. It has nothing to do with the actual function of cordova.
Thanks for bringing this up!
ok then, i am finding an issue. May you can help me. Its difficult to codepen. But I explain here.
I am working on android app which has couple of features
- Taking picture from my app - using “ng-cordova”.
- Calendar support - I am using http://arshaw.com/fullcalendar/. I integrated to my app.
Now what happens is, when ever I tap on either “>” or “<” of my calendar control, mouse click events are invoking twice. When I debug I found that mouse events are registering to “Cordova.js” and “ng-cordova.js”.
What I did was, I removed “cordova.js” from my includes. (in index,html). Then, I am seeing correct behaviour.
Any idea why it might happening or am I doing some thing wrong?
Hmm, with out seeing any code, I can’t be too sure. I see that the calendar is a jquery plugin, which could be causing issues. Check out angular-ui calendar
It’s based on arshaw’s calendar, but optimized for angular
mhartington, sorry for confusion. I am using http://angular-ui.github.io/ui-calendar/. Which has jquery dependency eventhough.
Please see my other post which you suggested,
I will try to do a code pen or share code in skydive. Between I developed my code using telerik app builder. Do you have app builder with you?
Ha, sorry about that, so many questions and people it’s hard to remember who’s who.
I do not use app builder, but you can share a zip with me via google drive
Here is location where I shared code.
let me knwo if you can access this. Thanks for you time man.
forgot to explain steps to reproduce:
- once app is loaded click on “Click for Calendar View”
- Now, you should see “Calendar View”.
- To reproduce, just click on “>” or “<” buttons. You should see day jumps 2 days ahead or back.
- Also, if you click on calendar you should see alert for 2 times.
Got it, so on lines 16 and 17, you have cordova and ng-cordova. Switch them around and things should work good.
<script src="ng-cordova.js"></script> <script src="cordova.js"></script>
As per the docs.
hmm, no luck. I am still seeing the same. PLease let me know if there is any thing I should try.
Alright, so there were a bunch of errors in the file. Some how, cordova was added twice, markup was all messed up and code was just a bit out of order. A bit too much to explain. So I packaged it up for you to take a look at and compare.