PouchDB not functional with Ionic - have minimal test case

Been grappling with this problem for over a month now, I cannot get PouchDB functional with my ionic application.

A minimal test case is available here, all the diagnostic information is outputted onto the screen via $scope.

CORS settings on couchdb are here (need admin access to view):
http://pastebin.com/KxNkUwib

Running ionic on chrome desktop works fine.
Running ionic on chrome mobile works fine.
Running ionic as APK on android device, doesn’t work.
Running ionic on firefox desktop doesn’t work.

The problem seems to be with connecting to couchdb database rather than local manipulation (I suggest you check the logs to validate this).

Do you receive any console errors when running on a device?

When an app works in the browser but not on a device it’s often caused by not including the whitelist plugin, or not having it configured correctly with the Content Security Policy tag in your index.html file, e.g:

<meta http-equiv="Content-Security-Policy" content="font-src 'self' data:; img-src * data:; default-src * 'unsafe-eval' 'unsafe-inline'">

(this is a very permissive CSP, you might want to use something more restrictive)

That may or may not be the issue, I just had a quick look and noticed it wasn’t included in your index.html file (you also need to add the whitelist plugin if you haven’t already, not just this tag) - your best bet will be to just use something like GapDebug and check the console errors when running on a device.

I think this fixed it, thanks.