Calendar Component in Angular Material

In this post, you'll learn how to use Angular Material calendar component without date picker input. The calendar component allows date selection in a month view, which could be useful for a wide range of use cases such as booking forms. In addition to displaying a calendar, we will validate…

Continue ReadingCalendar Component in Angular Material

Mocking Methods of Local Scope Objects with Mockito

Mockito is a widely used Java mocking framework. It has evolved over the years to offer an array of features that simplify the testing process and ensure the reliability of software applications. One notable improvement is the ability to mock methods of local scope objects, eliminating the need for PowerMock…

Continue ReadingMocking Methods of Local Scope Objects with Mockito

Does Angular require defaultProject property?

Migrating your Angular project to version 14 will automatically remove the defaultProject property in angular.json for single project workspaces. Let's understand what defaultProject is and when you might need it. What is default project in Angular? In Angular, a "default project" refers to the primary application or module within an…

Continue ReadingDoes Angular require defaultProject property?

How to Create a Bean of Class from a Java Library in Spring Boot

Spring Boot is a powerful framework that simplifies the development of Java-based applications. One of its key features is the ability to easily incorporate external libraries into your project. By creating a bean of class from a Java library, you can easily inject it into a constructor instead of creating…

Continue ReadingHow to Create a Bean of Class from a Java Library in Spring Boot

Change Detection in Angular: Default vs OnPush

One of the most loved features of Angular is its ability to automatically update the view whenever data changes. This is thanks to the default Angular's change detection mechanism, which constantly checks for changes in data and updates the view accordingly. While this is great for most use cases, it…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:7 mins read
Continue ReadingChange Detection in Angular: Default vs OnPush

Generating Routes File for Angular Universal Prerender

In this blog post, I will show you how to generate a routes file for prerendering an Angular Universal application. We will create a basic routes file and append routes dynamically from an XML sitemap ahead of running npm run prerender command when building the application. Pre-requisites This post assumes…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:6 mins read
Continue ReadingGenerating Routes File for Angular Universal Prerender

Introducing My New Blog

As the year 2022 comes to an end, I am pleased to introduce my new and improved blog! I've been working hard in my spare time for the past several months on this project. It has been challenging at times but I am really happy that I finally hit the…

  • Post category:Personal
  • Post comments:0 Comments
  • Reading time:4 mins read
Continue ReadingIntroducing My New Blog

Fixing Angular Unit Tests: Cannot read property ‘range’ of undefined

While upgrading Node from v12 to v16, I came across a problem with Angular unit tests where an exception would stop the test run with error Cannot read property 'range' of undefined. In this post, I'll explain the steps I took to identify the root cause of issue and propose…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:6 mins read
Continue ReadingFixing Angular Unit Tests: Cannot read property ‘range’ of undefined

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…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:7 mins read
Continue ReadingAngular Universal: Setting HTTP Status Code

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…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:3 mins read
Continue ReadingError: Cannot resolve type entity i3.DialogModule to symbol

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…

  • Post category:Angular
  • Post comments:0 Comments
  • Reading time:6 mins read
Continue ReadingUsing ng-deep in Angular