I have an Angular 6 project where I get an array of strings and need to call a backend service with each item in the array.

The component code (simplified) looks like this:

```
items: any[] = ['one','two','three']

for (let item of this.items) {
    this.dataSvc.searchItems(item)
    .subscribe(
        data => {
            console.log(item, data);
        })
}

```

And the Angular service code like this:

```
public searchItems(item: string): Observable<any> {
        let params = new HttpParams();

        params = params.append('item', item);

        return = this.httpClient.get(SERVER_API, { params: params })
}

```

This works fine with a single item in the array, however when the array scales, the service starts throwing timeout errors, and returning some, but not all results.

I've had issues interacting with this backend before, and in other areas where I have a fixed list of items that won't change, I have chained a static series of Promises in code such that I wait to call the service each time until the previous result is back, however I'm not sure how to accomplish the same thing in a loop.

This is how I've managed with a promise chain elsewhere with a Promise wrapper in the component:

```
fetchService(item): Promise<any> {
    return this.dataSvc.searchItems(item)
        .toPromise();
}

this.fetchService('one')
    .then(data => {
        console.log("one", data);
        return this.fetchRegCodeLit('two')
    }).then(data => {
        console.log("two", data);
        return this.fetchRegCodeLit('three')
    }).then(data => {
        console.log("three", data);
    })

```

The items array is dynamic, it may contain 10 or 100 items, and I need to be able to pass each to the same service, and guarantee that I've received a response and handled it before calling the service again, but I can't seem to figure out how.

I've been looking at async/await, and I think that's where the solution may lie, but any of the code permutations I've tried result in compile errors, so I'm clearly missing something.