Cannot stay on one page / route after closing modal window in Angular JS on iPad

Here is the problem. I use Angular JS + Phonegap for the iPad application, and I try to stay on the same path when on the page after closing the modal window with the video embedded in it.

Initially, the problem was that the video did not stop playing after closing the modal window, so I added the onTouchStart event for closeWindow() as follows:

 <div class="modal-youtube" ng-class="{visible: modalActive}"> <a class="close" href="#/mypage/#" eat-click ng-click="closeVideo()" onTouchStart="closeVideo()"></a> <iframe width="560" height="315" ng-show="youtubeLink" ng-src="{{youtubeLink}}" frameborder="0" allowfullscreen></iframe> </div> 

This works to stop the video when closing, but when closing the video, now it wants to go to the home page. I changed href="#" to what is now - href="#/mypage/# , to at least stay on the page that I want to be, but not in the same route.

For example, I have several different videos on separate routes or URLs, for example: # / mypage / product1, # / mypage / product3, # / mypage / product6

Here are the options for playing and closing videos:

 $scope.youtubeLink = null; $scope.modalActive = false; $scope.playVideo = function() { $scope.youtubeLink = angular.copy($scope.product.youtube); $scope.modalActive = true; }; $scope.closeVideo = function() { $scope.youtubeLink = null; $scope.modalActive = false; }; 

Any fix or help is appreciated!

0
javascript angularjs ipad cordova
Jul 18 '13 at 0:52
source share

No one has answered this question yet.

See similar questions:

44
angularjs gets the previous route of the route

or similar:

52
Is there a way to automatically close Angular UI Bootstrap modal when changing the route?
36
angular ui modal after closing event
one
how to get href value for onclick event based on "class" selector in javascript?
one
How to close Bootstrap modal window after a given time interval using jQuery?
one
VideoJS / HTML5 Video -Stop all videos?
0
running code after opening ipad modal window
0
Video.js in modal termination of playback after initial modal closure, on iPad
0
Control when someone tries to close the browser window / tab
0
Confirmation of closing a corner modal window
0
can't open modality after closing first modal use with Angular ui



All Articles