this is an attempt at implementing this tutorial http://briantford.com/blog/angular-phonegap.html