function locationGetter(property) {
  return /** @this */ function() {
    return this[property];
  };
}
@ngdoc method
@name $location#state

@description
This method is getter / setter.

Return the history state object when called without any parameter.

Change the history state object when called with one parameter and return `$location`.
The state object is later passed to `pushState` or `replaceState`.

NOTE: This method is supported only in HTML5 mode and only in browsers supporting
the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support
older browsers (like IE9 or Android < 4.0), don't use this method.

@param {object=} state State object for pushState or replaceState
@return {object} state