How to get response header in angular using http interceptor

How to read the response headers in implementation of httpinteceptor in angular. I have exposed all the token in my node application. Since i am not able to read all the keys which is passed in response headers intercept(req: HttpRequest<any>, next: HttpHandler) { return next .handle( req.clone({ headers: req.headers.append(‘API-Token’, ‘token’) }) ) .pipe( tap((res: HttpEvent<HttpEventType>)…

Discover more

How to display the array value in a table using angular 8?

Following is the Api { “data”: [ { “id”: “sdff12”, “documentTypeId”: “617ffgv22”, “fileType”: “TIFF”, “attributes”: [ { “attributeId”: “1”, “customerName”: “XYZ”, “VIN”: “10XYAZHSKS” }, { “attributeId”: “2”, “customerName”: “ABC Dealer”, “VIN”: “98GSBS8S6D” } ] } ]} I need to display the values inside the attribute[] in a normal html table I want the output as,…

Discover more

I am working on an Angular app, where I get a list of albums and photos using the Flickr API [duplicate]

This question already has an answer here: Flickr JSON returning error in JavaScript cross domain 2 answers Flickr API call with XMLHttpRequest not working 1 answer I am working on an Angular app, where I get a list of albums and photos using the Flickr API. Below is the serviced I created to consume the…

Discover more

Play audio files from select list

I am using the NativeAudio plugin for ionic 3. I would like to play an audio when an option is selected from a select list. I have the following code in audio.html file: <ion-item> <ion-label>Select Audio File</ion-label> <ion-select [(ngModel)]=”audiofile” interface=”action-sheet”> <ion-option value=”track1″ (click)=”playAudio()”>Track 1</ion-option> <ion-option value=”track2″>Track 2</ion-option> <ion-option value=”track3″>Track 3</ion-option> </ion-select> </ion-item> </ion-list> audio.ts import…

Discover more