Tuesday 15 April 2014

angularjs - PhoneGap 2.8.0 raising "no method 'overrideBackbutton'" with angular-mobile-nav -


I'm having a problem with angular mobile-nav on the initial page load of Cornrovia. 2.8 The Android Project is using Triple Emulator. The error I am getting is:

  Type error: object # & lt; Object & gt; (: //geelfhphabnejjhdalkjhgipohgpdnoc/ripple.js: 40: Chrome extension 22917) on backButtonChannel.onHasSubscribersChange no method 'overrideBackbutton' in module.exports.exec (http: // localhost: 8076 / cordova.js: 1145: 13) Channel on .subscribe (http: // localhost: 8076 / cordova.js: 667: 49) on HTMLDocument.document.addEventListener (http: // localhost: 8076 / cordova.js: 132: 34). Of the null & lt; Anonymous & gt; (Http: // localhost: 8076 / components / mobile-nav / Mobile nav.js: 11: 14) on Channel.fire (http: // localhost: On 8076 / cordova.js: 709: 23) http: / /localhost:8076/cordova.js:232:47   

in fact, it is because mobile nav.js line 11:
document.addEventListener ( "backbutton ", function () {

and error cordova.js' call line taken by that of 1145:
executive (null, null," app "" OverrideBackbutton ", [This.numHandlers == 1]);

is it a problem that you can repeat? will greatly appreciate any help.

I used to face it for the first time while using wave with PhoneGap 2.5.0. As you point out, for Android, Cordova-8.8.JS On line 1145, if it is running on the Android platform, the native function says App.overrideBackbutton () which is not a stub for the wave.

Since it only encloses / separates the first handler, It says, I worked around this wave Nking by confusing already more handlers than one:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" charset = "utf-8" src = "cordova-2.8.0.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" charset = "utf-8" src = "jquery-1.7.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; _Is_RIPPLE_EMULATOR = $ ('# tinyhippos-injected'). Length & gt; 0; Function deviceready () // // wave wave looks like if a back button handler has already been attached (_IS_RIPPLE_EMULATOR) cordova.addDocumentEventHandler ('backbutton'); Document.addEventListener ("backbutton", function () {warning ("back pressed");}); } Document.addEventListener ("deviceready", Divisor, True); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

No comments:

Post a Comment