Tutorials, guides and articles on Angular framework.
Without a doubt, Visual Studio Code is one of the most popular front-end IDEs. It's popularity is due to its speed and customisability with extensions from the marketplace. Even though Microsoft has been improving VS Code to include new features, there are still missing features! I will share the best…
I often come across Angular components that retrieve data from a remote API inside the ngOnInit lifecycle hook. While this is an easy way to load data into the component, it can can increase the size of the component and lead to duplication. A better approach is to use route…
Angular is a modern, highly performant application framework. Learning Angular is one of the best things you can do in your career as a web developer. But it is no good if your code does not work, which is where a good test suite comes into play. I have built…
Azure Application Insights is a cloud based application monitoring service from Microsoft. You can monitor your applications in all of your environments with Application Insights, including development and production. Microsoft has been shipping Visual Studio with built-in support for Application Insights in Windows. However, Visual Studio for Mac does not…
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…
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…
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…
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…
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…
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.…
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…
In this post, we create a scalable Angular project structure that is ideal for medium to large applications. 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, which…