calls cordova api and displays it using angularjs