Commit graph

21 commits

Author SHA1 Message Date
Vojta Jina
f2fab49830 style: make jshint happy 2013-10-22 15:32:41 -07:00
Angel Balcarcel
d70711481e fix($location): prevent infinite digest error in IE7
Refactored `replacedUrl` to store the new URL on both
`location.replace` and setting `location.href` directly to handle
delays in the actual location value change in IE.

Closes #2802
2013-10-02 15:33:31 -07:00
Jeff Cross
2ebf931630 fix($location): re-assign location after BFCache back
In the Android browser, the BFCache maintains
the state of JavaScript applications even when
navigating to another app, so that going
forward and back, to and from an application
is very fast.

Unfortunately, this can have undesired side
effects. In this instance, the location
variable was holding a reference to a stale
window.location, and was throwing errors
when going back to an Angular app after
browsing to another site.

This fix makes sure that location.url()
includes a check to make sure that location
is referencing the current window.location.

Closes #4044
2013-09-30 13:02:40 -07:00
Ben Tesser
1b5217b1d6 docs($browser): add jsdoc tags and fix typo 2013-09-13 21:37:14 +01:00
Carl Danley
258e986284 docs(*): fixed typos and ngdoc parameter names 2013-07-27 20:53:41 +02:00
Pavel Vasek
dca23173e2 fix($location): prevent infinite digest error due to IE bug
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which
don't support location href, we use location.replace to reload the page
with the hashbang equivalent of the url but this fails with infinite
digest. This is because location.replace doesn't update location.href
synchronously on IE8 and 9.

Closes #2802, #3305, #1417
2013-07-24 10:38:13 -07:00
Michał Gołębiowski
f1b94b4b59 feat(jqLite): switch bind/unbind to more recent jQuery on/off
jQuery switched to a completely new event binding implementation as of
1.7.0, centering around on/off methods instead of previous bind/unbind.
This patch makes jqLite match this implementation while still supporting
previous bind/unbind methods.
2013-06-19 20:53:24 +01:00
Chirayu Krishnappa
3952d35abe fix($browser): should use first value for a cookie.
With this change, $browser.cookies()["foo"] will behave like
docCookies.getItem("foo") where docCookies is defined at
https://developer.mozilla.org/en-US/docs/DOM/document.cookie

This fixes the issue where, if there's a value for the XSRF-TOKEN cookie
value with the path /, then that value is used for all applications in
the domain even if they set path specific values for XSRF-TOKEN.

Closes #2635
2013-05-11 09:28:14 -07:00
Pascal Borreli
9480136d9f docs(*): fixed typos 2013-03-29 23:14:55 +01:00
Fredrik Bonander
7090924515 fix($cookies): set cookies on Safari&IE when base[href] is undefined
Safari and IE don't like being told to store cookies with path set to
undefined. This change ensures that if base[href] (from which cookie path
is derived) is undefined then the cookie path defaults to ''.

The test verifies that the cookie is set instead of checking that cookie has correct path,
this is due to that cookie meta information is not avabile once the cookie is set.

Closes #1190, #1191
2013-02-07 02:36:25 -08:00
Igor Minar
5b5f35d5e4 refactor($browser): remove faulty 20+ cookies warning
the warning is defunct (and the test is incorrect) so obviously nobody is using
it and it just takes up space.

also the browser behavior varies (ff and chrome allow up to 150 cookies, safari
even more), so it's not very useful.

Closes #1712
2013-01-08 14:23:50 -08:00
Misko Hevery
ffb270130a fix(browser): prevent ie from getting into redirect loop
Closes #1075
Closes #1079
Closes #1085
2012-06-22 10:21:31 -07:00
Igor Minar
f158d81d21 docs($browser): hide $browser docs - it's a private service 2012-06-12 01:14:45 -07:00
Igor Minar
f16150d5f1 docs(*): simplify doc urls
we now have two types of namespaces:

- true namespace: angular.* - used for all global apis
- virtual namespace: ng.*, ngMock.*, ... - used for all DI modules

the virual namespaces have services under the second namespace level (e.g. ng.)
and filters and directives prefixed with filter: and directive: respectively
(e.g. ng.filter:orderBy, ng.directive:ngRepeat)

this simplifies urls and makes them a lot shorter while still avoiding name collisions
2012-06-12 00:10:18 -07:00
Igor Minar
679cb8a74a fix($browser/$location): single quote in url causes infinite digest in FF
The real issue is in FF, see https://bugzilla.mozilla.org/show_bug.cgi?id=407172.

FF overly encodes stuff which breaks our expectations and then we fail .url() != currentUrl.absUrl()
comparison unexpectidly, which leads to infinite digest.

The workaround is to correct for this inconsistency in $browser and decode any single quotes in urls.

Closes #920
2012-05-13 21:53:19 -07:00
Misko Hevery
b99f65f64d bug(html5 navigation): broken in Opera
http://my.opera.com/community/forums/topic.dml?id=1185462

Closes# 938
2012-05-07 15:43:09 -07:00
Misko Hevery
d0159454df bug($cookie): set on app base path rather the current path. 2012-05-04 15:50:39 -07:00
Igor Minar
52ee1ab5eb chore(*): remove dead code and fix code style issues 2012-04-10 16:52:12 -07:00
Igor Minar
fbaa1968b7 chore($browser): remove the addJs method
this was never meant to be a public api used by apps. I refactored
the code to hide the functionality.

BREAKING CHANGE: $browser.addJs method was removed

apps that depended on this functionality should either use many of the
existing script loaders or create a simple helper method specific to the
app.
2012-04-09 17:59:47 -07:00
Igor Minar
13d5528a5f chore($browser): remove the addCss method
this api was never supposed to be public. nobody should be relying
on it.

I'm removing it since angular doesn't need it.

BREAKING CHANGE: $browser.addCss was removed

apps the depend on this functionality should write a simple utility
function specific to the app (see this diff for hints).
2012-04-09 15:21:46 -07:00
Misko Hevery
2430f52bb9 chore(module): move files around in preparation for more modules 2012-03-28 11:16:35 -07:00
Renamed from src/service/browser.js (Browse further)