History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API
This error occurs when the $location.state method is used when $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.