Solved

loop Back to root page Windows Mobile IE  AngularJS

Posted on 2014-12-17
4
313 Views
Last Modified: 2014-12-23
I have an AngularJS based Mobile web application. That works fine in iPhone/Galaxy. However it behaves differently in Windows 8  Phone . In Windows Mobile, we can move forward easily to 2-3 pages but when the phone's hardware back button is touched, it does not go to previous screen, instead it goes to the first login page. Why is this behavior and how do I fix it?
0
Comment
Question by:rbhargaw
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 40507858
what version of IE are you running in your windows phone 8? I believe it's IE10 Mobile, but not sure.

what version of angular are you using?

I don't know for sure, but i suspect it has something to do with push states not being available in IE, which is what latest angular uses to do routing.

Just some paths to explore...
0
 

Accepted Solution

by:
rbhargaw earned 0 total points
ID: 40508250
Angular version is 1.2.22 and its windows phone 8.1 with the mobile version of IE 11.

I think I have found the solution just now

https://github.com/angular/angular.js/issues/5980

Did this as mentioned in one of the comment and it worked.

As you suspected, seems like something to do with push state

if ($sniffer.history) {
Replace with:
if ($sniffer.history && ! $sniffer.msie) {
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 40508272
that's great. glad it worked out
0
 

Author Closing Comment

by:rbhargaw
ID: 40514577
Did research and found on my own before the experts can point to any direction
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now