Tutorials, guides and articles on Angular framework.
Execute E2E Tests in Different Environments
The default Angular project template executes end-to-end tests using the development environment. If you're like me and switch to a Mac from Windows quite frequently, you may want to have the ability to execute your e2e tests in a different configuration. We will enable executing Angular e2e tests in different…
whats new in Angular 8
Angular 8 is finally here! In this post we will look at what's new in Angular 8. Angular 8 is a major release for the entire Angular framework, Angular Material and the CLI. Ivy renderer to be available as an opt-in previewFaster startup time on modern browsersNew APIs to interact…
Prevent Caching in Internet Explorer
In this post, we will explore how to prevent caching get requests in Angular. This is an old issue that gets me every time I begin working on a new Angular project. Internet Explorer caches all GET requests, which means that a user won't see any changes after a database…
Angular Show Spinner with Every HTTP Request
Loading spinners are an essential requirement for any Angular app to indicate the application is busy. This is often the case when an HTTP request is in progress. While it is possible to manually show and hide a loading spinner, we can avoid code duplication with a custom HttpInterceptor. In…
Convert Timespan to Business Days using Angular Pipe
I recently had an interesting problem to solve around displaying TimeSpan values in Angular. Introduction My API happens to be written in .NET Core using C#, which returns a timespan representing a duration value. Our aim is to convert TimeSpan values to the display format 1d 1h 10m. As an…
Angular Routing and Navigation
Implement routing in Angular to enable navigation from one view to another. Users click buttons, anchor links and select options in drop-downs to perform tasks in web applications. Routing plays a key role in any modern web application and Angular makes it very easy to implement routing with router outlet.…
Download File with Angular from .net core api blob result
In this post, I will show you how to download a file in Angular from a remote web API. CSV files, Excel spreadsheets, Word documents, PDF reports and images are common types of files that a functional Angular web app may need to download. In most cases, back-end APIs return…
Angular Project Structure
In this post, we create a scalable Angular project structure that is ideal for medium to large applications. [toc] Introduction Although Angular CLI does a great job at generating a new project, it does not force you to use a specific folder structure. Your initial project contains a single module,…
Logging in Angular with ngx-logger
In my previous post, I talked about catching all errors in Angular with a global error handler. If you want to keep the errors you capture, you need to implement a reliable logging mechanism. Today, I want to explain how to enable Angular logging in your applications with ngx logger…
Angular Global Error Handling
In this post, we will implement global error handling in Angular. Global error handling is one of the first things I implement in a new project. It helps avoid repetitive try/catch blocks in Angular components, services or directives. It gives me confidence that all errors will be captured consistently. Create…
Getting Started with Angular
Angular is a single page application (SPA) development framework for well-structured, testable and maintainable front-end applications. It is one of the most-widely used application framework in the world. According to Stack Overflow Developer Survey, Angular is used by 36.9% participants. Angular's popularity is due to its compatibility across platforms. Apps…