Javascript Angular Ionic Cordova