code: function(newParams) {
              if (this.current && this.current.$$route) {
                newParams = angular.extend({}, this.current.params, newParams);
                $location.path(interpolate(this.current.$$route.originalPath, newParams));
                // interpolate modifies newParams, only query params are left
                $location.search(newParams);
              } else {
                throw $routeMinErr('norout', 'Tried updating route when with no current route');
              }
            }
docs: @ngdoc method
  @name $route#updateParams
  
  @description
  Causes `$route` service to update the current URL, replacing
  current route parameters with those specified in `newParams`.
  Provided property names that match the route's path segment
  definitions will be interpolated into the location's path, while
  remaining properties will be treated as query params.
  
  @param {!Object<string, string>} newParams mapping of URL parameter names to values