Setting up Enterprise Angular Applications (AngularInDepth)

What will we cover ?

  1. Angular basic setup with Folder structure — Basic angular configuration and folder setup
  2. Document generator Compodoc setup for document generation
  3. Mutation test setup Stryker setup for mutation testing
  4. Duplication test setup JSCPD for duplication identification setup
  5. Http Request Service — To handle all http request (abstraction for frequent handler change) and setting up common header items
  6. Error handling interceptor — To handle all Http errors and setup retries
  7. API prefix interceptor — To handle CORS calls and redirecting it to a particular base URL to switch between multiple rest clients
  8. Common logger — To handle all loggings using common logic for the project avoiding console.log
  9. Common loader — Common loader for whole application using interceptor
  10. Until destroy — RxJS operator that unsubscribe from observables on destroy to avoid leaks
  11. Route reusable strategy — A route strategy allowing for explicit route reuse

Setup angular application using CLI

Basic setup of folder structure:

Core Module:

  1. Http request service: This is a abstraction service between httpClient and our application. It helps in changing any global configurations without changing the application logic. This also helps in setting http headers for all requests (used in authentication)

Shared Module:

  1. loader interceptor — The loader interceptor helps in identifying all http requests and adding a common loader for the same. This can count the number of request made and switch-off loader once all responses are received.

Functional Module:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store