2

I have a script like this and will be called when the button is clicked.

<button class="btn btn-main btn-lg" ng-click="openIOSApp()">Open App</button>

$scope.openIOSApp = function() {
      // url format: myapp://
      $window.location.href = $scope.assets.urls.iosAppCustomUrl + "action/signupdone?email=" + $scope.myInfo.email;
    };

There is a technique using timeout for failover (https://stackoverflow.com/a/6965646/772481). However, angular $timeout won't cancel automatically if the link works. What is the alternative to open app store on angular if the custom app link doesn't exist?

Community
  • 1
  • 1
angelokh
  • 9,426
  • 9
  • 69
  • 139

0 Answers0