![]() ![]() The idea here is to be able to intercept http requests, attach an authorization header to the request. ![]() In this post, we are going to build a http interceptor for refreshing authorization tokens once expired. Step-1: We create a method to fetch data over. Here we will provide code snippets to use Observable with async pipe using ngFor. Observable + Async Pipe + NgFor Angular async pipe subscribes to Observable and returns its last emitted value. X2 The HttpClient.get returns Observable.We can specify our required data type in place of any, for example we are returning here Observable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |