1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27// install : cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator
// link : https://github.com/dpa99c/phonegap-launch-navigator
/* globals launchnavigator: true */
angular.module('ngCordova.plugins.launchNavigator', [])
.factory('$cordovaLaunchNavigator', ['$q', function ($q) {
return {
navigate: function (destination, start, options) {
var q = $q.defer();
launchnavigator.navigate(
destination,
start,
function (){
q.resolve();
},
function (error){
q.reject(error);
},
options);
return q.promise;
}
};
}]);