This is my array of actors:
[\'Elvis\', \'Jane\', \'Frances\']
How to pass this array within a query strin
I'm using URLSearchParams
instead of HttpParams.
With URLSearchParams you need to stringify your array to set it to your Params "Key-Value-Store".
import { URLSearchParams } from '@angular/http';
let params: URLSearchParams = new URLSearchParams();
params.set('actors', JSON.stringify(yourArrayHere));
I think this should work on the same way with HttpParams because both using a Key-Value mapping in the set method so give it a try.
I hope this can help you.
UPDATE:
let options = new RequestOptions({search: params});
this._http.get(url, options).map(...)
with RequestOptions
you can also edit Header and other request options.