diff options
| author | Igor Minar | 2014-02-25 22:59:31 -0800 | 
|---|---|---|
| committer | Igor Minar | 2014-02-25 22:59:31 -0800 | 
| commit | 3d6dff44f33b192a7fa007bfda5e44574fadc6e1 (patch) | |
| tree | 6dcc48051c6974ac9320b907304ce167c6ec2a85 /test | |
| parent | 6b049c74ccc9ee19688bb9bbe504c300e61776dc (diff) | |
| download | angular.js-3d6dff44f33b192a7fa007bfda5e44574fadc6e1.tar.bz2 | |
revert: fix($location): parse query string when path is empty in hashbang mode
This reverts commit cad717b1171affc3d540cea372576c70b0cb2295.
This change causes regressions in existing code and after closer inspection
I realized that it is trying to fix an issue that is should not be considered
a valid issue.
The location service was designed to work against either "hash" part of the
window.location when in the hashbang mode or full url when in the html5 mode.
This change tries to merge the two modes partially, which is not right. One
reason for this is that the search part of window.location can't be modified
while in the hashbang mode (a browser limitation), so with this change part
of the search object should be immutable and read-only which will only cause
more confusion.
Relates to #5964
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/locationSpec.js | 24 | 
1 files changed, 0 insertions, 24 deletions
| diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index 8ff5da30..ff823d30 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -1487,30 +1487,6 @@ describe('$location', function() {        expect(location.url()).toBe('/not-starting-with-slash');        expect(location.absUrl()).toBe('http://server/pre/index.html#/not-starting-with-slash');      }); - -    describe("search()", function() { -      it("should return a populated search object for search query when path is empty", function() { -        location = new LocationHashbangUrl('http://server/pre/index.html', '!'); - -        location.$$parse('http://server/pre/?foo=1&bar=2&baz=3'); -        expect(location.path()).toBe(''); -        expect(location.absUrl()).toBe('http://server/pre/index.html?foo=1&bar=2&baz=3') -        expect(location.search()).toEqual({ -          foo: '1', -          bar: '2', -          baz: '3' -        }); - -        location.$$parse('http://server/pre/index.html?foo=1&bar=2&baz=3'); -        expect(location.path()).toBe(''); -        expect(location.absUrl()).toBe('http://server/pre/index.html?foo=1&bar=2&baz=3') -        expect(location.search()).toEqual({ -          foo: '1', -          bar: '2', -          baz: '3' -        }); -      }); -    });    }); | 
