Closed lukasvencalek closed 6 years ago
@Vencalekl thanks for pointing it out. I am guessing changing const to let will do the same trick. Amended it in https://github.com/asadsahi/AspNetCoreSpa/commit/9f0d40df12efd0eca82dee89ae36152417b9fefd. Let me know if it doesn't fix for you.
@asadsahi, I just tried it without success. It is still required to re-set the variable. Once the HttpParams is immutable, I guess there is no other way of doing that.
In DataService, get method calls buildUrlSearchParams where the httpParams object is set. However, httpParams object is immutable (https://github.com/angular/angular/issues/19044) so after calling of append, it is required to set the object back into the variable, otherwise it is always empty.
To fix the issue, the method should look like this: