function locationGetter(property) {
  return function() {
    return this[property];
  };
}
@ngdoc method
@name ng.$location#replace
@methodOf ng.$location

@description
If called, all changes to $location during current `$digest` will be replacing current history
record, instead of adding new one.