Tutorials, guides and articles on Angular framework.

Read more about the article Angular Universal: Setting HTTP Status Code
Angular

Angular Universal: Setting HTTP Status Code

Angular Universal gives superpowers to traditional Angular apps such as server-side rendering (SSR) and full features using Express.js server. This allows us to implement features like returning HTTP status codes in appropriate scenarios. In this post, I will show you how to set the HTTP status code from an Angular…

0 Comments
Read more about the article Error: Cannot resolve type entity i3.DialogModule to symbol
Angular

Error: Cannot resolve type entity i3.DialogModule to symbol

While updating my Angular Material Starter Template to Angular 14, I ran into an error causing broken builds. The console output seems to suggest this is a problem with Dialog module from Angular Component Dev Kit (CDK): Cannot resolve type entity i3.DialogModule to symbol. ./src/polyfills.ts - Error: Module build failed…

0 Comments
Read more about the article Using ng-deep in Angular
Angular

Using ng-deep in Angular

ng-deep is a special selector in Angular that you should use very carefully. I often come across ng-deep in code reviews, where I investigate further to see if it is really necessary. In this post, I will talk a little bit about ng-deep: what it does, where it is useful…

0 Comments
Read more about the article Making Styles Work with [innerHtml] in Angular
Angular

Making Styles Work with [innerHtml] in Angular

In this post, we'll look at how we can apply styles to html content rendered via innerHtml attribute. By default, styles defined in an Angular component only work in that specific component. This is due to the Emulated view encapsulation policy set by Angular. This logical scope is great because…

0 Comments
Read more about the article How to Queue Messages Sent to LiveAnnouncer
Angular

How to Queue Messages Sent to LiveAnnouncer

Angular provides LiveAnnouncer service to trigger screen reader announcements programmatically. It works well in simple scenarios but fails to queue messages when used concurrently. In this post, I will show you how to extend LiveAnnouncer to announce simultaneous messages. Problem demonstration There are many things to consider when it comes…

0 Comments

5 Angular CLI Tips You Should Know

As Angular developers, we often interact with the command-line interface (CLI) to scaffold components and manage packages. It is very important to master the CLI to make sure your development flow is smooth. Having developed several Angular applications myself, I have come to realise the 5 tips below. [toc] Shorten…

0 Comments
Read more about the article How to Use PDFjs to Parse PDF Documents in Angular
Parse PDF documents with pdfjs in Angular

How to Use PDFjs to Parse PDF Documents in Angular

In this post, I'll show you how to parse a PDF document in Angular. We will extract full text content of a PDF file using pdfjs-dist library. Generate a new Angular application, if you do not have one already: ng new PdfReader Install the latest version of pdfjs-dist from npm:…

8 Comments
Read more about the article Monitoring Live Angular Apps with Application Insights
Azure dark

Monitoring Live Angular Apps with Application Insights

In this post, I will explain how you can monitor Angular apps using Microsoft Azure Application Insights. It is not unusual for organisations to ignore monitoring single page applications. Usually, back-end applications such as APIs are monitored via logs, CPU and memory usage. When it comes to front-end, there is…

3 Comments
Read more about the article Best Visual Studio Code Extensions for Angular Developers
Best Visual Studio Extensions for Angular Developers

Best Visual Studio Code Extensions for Angular Developers

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…

2 Comments
Read more about the article Simplifying Angular Components with Route Resolvers
Simplify components with route resolvers

Simplifying Angular Components with Route Resolvers

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…

1 Comment
Read more about the article Angular Testing Overview
Angular Testing Overview

Angular Testing Overview

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…

0 Comments
Read more about the article Monitoring Live .NET Core APIs with Application Insights
Azure dark

Monitoring Live .NET Core APIs with Application Insights

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…

1 Comment