Michael J. Calkins
Michael J. Calkins

Reputation: 32683

Angular JS breaks in Safari but not Chrome

I've written an application that works great in the desktop browser but breaks in Safari. Does Angularjs support the iPad's native browser?

I've been googling and can't find anything that isn't related to PhoneGap. It's just javascript in a browser isn't it?

How do you even debug this?

Solution

I was using reserved words like delete in my services which broke safari and not chrome. On both desktop and tablet safari is broken but chrome works. I have to switch the reserved words to something like remove.

http://paste.laravel.com/NNB

Upvotes: 5

Views: 27479

Answers (3)

Grest
Grest

Reputation: 51

Instead of renaming the method you may change the way of calling it. For instance service['delete']() instead of service.delete()

Same problem exists with method finally of promise object (older IEs even crash on call promise.finally()).

Upvotes: 2

Max
Max

Reputation: 2131

AngularJS 1.0.7 works fine on my iPad (first edition) with IOS 5.whatever.the.last.supported.version.was! It's surprisingly quick, too, although Mobile Safari crashes with depressing regularity when it runs out of memory! This happens on many other web sites, though.

Upvotes: 1

Michael J. Calkins
Michael J. Calkins

Reputation: 32683

On the iPad go Settings > Safari > Developer > Enable Debugging

On top of safari you'll get a "1 Error" or "19 Errors" and when you click the bar it will list out the console for you.

Upvotes: 5

Related Questions