Ion-side-menu not valid HTML for PhoneGap?


#1

I’ve been troubleshooting an app with for several days now with no success, and as of this morning started just rebuilding it from scratch to see where the problem is.

Adobe PhoneGap Build support has finally gotten back to me saying the issue is with invalid HTML.

W3C Validator is telling me the only invalid HTML in the document is the ion-side-menus tag.
“Element ion-side-menus not allowed as child of element body in this context.”

Any ideas how to fix this?


#2

Hey there, this is to be expected since ion-side-menus is a directive and not a standard HTML element. I can’t believe that this could be the cause of the issue.

Any way you can post a codepen that simulates this?


#3

Yeah, that’s what I figured, but apparently the PhoneGap experts aren’t going to look any further because it’s not valid HTML so I’m back to where I was on Monday.

I’ve backtracked to building a “Hello World” app based on the tutorial linked below, that does nothing other than basic functions (login, create account, push information), and I’m still running into issues where things work fine web-based but break in an emulator or app build.

Trying to debug with eclipse, which is a good bit outside of my comfort level, but it’s the only thing that gives me any access to a console log on the compiled app. Noticed that that having $ionicPlatform.ready in the app.run function caused issues, but removing it seems to have removed that problem and that’s all I’ve gotten to so far.

No idea how to CodePen this to show it not functioning in an android emulator.


#4

Do you have github link or a private repo? I can take a look at whats causing some issues?


#5

Sort of fixed - but I don’t know how / why.

The problem with the Hello World version had something to do with my eclipse configuration. No idea how to use eclipse, but I can chalk that up to experience level. If I did I’d probably be building native instead of hybrid apps. Sucks that I have upload and then hydrate to test every little change, but no other option at the moment.

Got the “Hello World” version working using PhoneGap Build and have since progressed from there.

The fix to get it working was I had to remove the following parts from the example code I linked above for the app.js .run section.

$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}

Having that run block within the $ionicPlatform.ready() function caused nothing to load. The Cordova stuff I really had no idea what it was doing anyway, but the app seems to run fine on my Nexus 7 without it.

Currently rebuilding my app from the ground up starting with the Hello World, but have functioning ionic/firebase working on at least one device at the moment.