Files
angular.js/docs/content/error/$location/nostate.ngdoc
Michał Gołębiowski 6fd36deed9 feat($location): add support for History API state handling
Adds $location state method allowing to get/set a History API state via
pushState & replaceState methods.

Note that:
- Angular treats states undefined and null as the same; trying to change
one to the other without touching the URL won't do anything. This is necessary
to prevent infinite digest loops when setting the URL to itself in IE<10 in
the HTML5 hash fallback mode.
- The state() method is not compatible with browsers not supporting
the HTML5 History API, e.g. IE 9 or Android < 4.0.

Closes #9027
2014-10-07 15:48:10 -07:00

9 lines
531 B
Plaintext

@ngdoc error
@name $location:nostate
@fullName History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API
@description
This error occurs when the {@link ng.$location#state $location.state} method is used when {@link ng.$locationProvider#html5Mode $locationProvider.html5Mode} is not turned on or the browser used doesn't support the HTML5 History API (for example, IE9 or Android 2.3).
To avoid this error, either drop support for those older browsers or avoid using this method.