基本上我正在尝试使用深层链接打开一个应用程序,并且在执行某些功能后,再转回app1。我正在使用cordova和离子。
https://github.com/EddyVerbruggen/Custom-URL-scheme
但永远不会调用handleOpenURL。
代码是下一个:
<head>
<meta charset="utf-8">
<meta name="viewport" content="viewport-fit=cover, initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, height=device-height">
<meta name="format-detection" content="telephone=no">
<title>BEM Móvil</title>
<link href="manifest.json" rel="manifest">
<link href="lib/Ionicons/css/ionicons.min.css" rel="stylesheet">
<link href="css/ionic.app.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/angular-filter/dist/angular-filter.min.js"></script>
<script src="lib/ng-idle/angular-idle.min.js"></script>
<script src="lib/ng-pattern-restrict/src/ng-pattern-restrict.min.js"></script>
<script src="cordova.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="js/app.js"></script>
<script src="js/directives.js"></script>
<script src="js/config.js"></script>
<script src="app/security/security.js"></script>
<script src="app/mitm/mitm.js"></script>
<!--
***************************
***************************
******* CONTROLLERS *******
***************************
***************************
-->
<script src="js/controllers/main.js"></script>
<!--
************************
************************
******* SERVICES *******
************************
************************-->
<script src="js/services/securityService.js"></script>
<script src="mfp-scripts/init.js"></script>
<script>
handleOpenURL = function (url) {
setTimeout(function(){
window.foo = 'The url is ' + url;
},0);
};
</script>
</head>
当应用程序打开时,如何告诉控制器应用程序是否由URL打开?