You can just do `angular.extend(newParams, p)` here - no need to get the returned value.