Angular Http Caching using Interceptor and Refresh

This article is written assuming you have a fair understanding of how an Angular Interceptor works and what they do. Caching an Http request for GET calls is highly important as it will avoid making an API service calls unnecessarily. An Interceptor can be used to delegate caching without disturbing your existing Http calls....

Angular Typeahead using switchMap – a use case

There are plenty of options available in Angular world to implement TypeAhead feature for your project, such as; Angular Material Autocomplete (https://material.angular.io/components/autocomplete/examples) NG Bootstrap Typeahead (https://ng-bootstrap.github.io/#/components/typeahead/examples) Prime-Ng (https://www.primefaces.org/primeng/#/autocomplete) Although, there is no need to reinvent the wheel here, still a simple analysis on how a type ahead works in the above libraries will help...

forkJoin vs combineLatest

Learning RxJS is quite challenging and it is undoubtedly the great tool for front-end developers. We cannot grasp entire RxJS operators in one go, but we may encounter some operators for our use cases. One such operators are forkJoin and combineLatest. forkJoin is a special operator from RxJx that let’s you combine / accept...

Minify / Uglify / remove comments your final Angular build

Removing unwanted code and minifying your application is a crucial step before pushing to production. To fix this, just open up angular.json config file in your editor and navigate to  “Projects” > “Name Of Your Angular App” > “architect” > “configurations” > “production” By setting the “optimization” to true, “vendorChunk” to true and “aot”...