Technical Blog

Two methods of declaring modules in Angular

Does the module returned by the static forRoot method come with the providers declared in @NgModule() decorator? I thought that is an interesting question because Angular can act either way. The method forRoot returns an object that implements ModuleWithProviders which consists of a reference to an Angular ngModule and a list of providers

Read more...

TypeScript encapsulation demystified

TypeScript as a language is always ahead of the curve in favor of JavaScript. It brings ECMAScript features much faster than they become a standard or browsers implement them. encapsulation is one of the most important paradigms of the Object Oriented Programming

Read more...

How to make Angular OnChanges better

Like most of you, I work in a team of a couple of programmers and our responsibility is to handle a few big Angular projects. In order to keep our project's codebase clean, readable and without any bugs we try to use verified Angular patterns. One of them is obviously the Smart and dumb components pattern

Read more...

The correct way of mocking dependencies in the Angular unit tests

Recently I had the pleasure of doing a small refactor in an Angular project. Refactor is one of my favorite things to do so I was glad that I had a chance to do it. It wasn't anything especially complicated, a basic name change, but the interesting part is that after my modifications our unit tests started to fail. I was confused by the whole situation so I started to unravel the mystery that was behind the failing tests

Read more...

How to forget about the management of subscriptions and change detection in Angular

Testing the RxJs library may require programmers to change their way of thinking as it brings lots of challenges. It is agnostic from any JavaScript framework and has lots of features which makes it a very popular library amongst frontend technical stack.

Read more...

RxJs testing patterns

Testing the RxJs library may require programmers to change their way of thinking as it brings lots of challenges. It is agnostic from any JavaScript framework and has lots of features which makes it a very popular library amongst frontend technical stack.

Read more...

The better side of the Single value Observables in RxJs

The RxJs library is a great set of tools that can help you bring your application reactivity to the next level. One of the various features of Observables is that they return a series of values. You can simply connect to a stream of data and receive various values over a period of time

Read more...

The architecture of module dependencies in Angular

Every good programmer should know this famous Robert C. Martin concept "Good architecture allows us to delay making serious decisions as long as possible". This quote should be taken into consideration every time an architectural decision is being made. It is especially important in today's frontend development where everything is rapidly changing.

Read more...

An enterprise approach to the Smart and Dumb components pattern in Angular

The smart and dumb components pattern is a very commonly used practice. I like to call it pure and impure, I feel that it makes more sense when you take functional programming into consideration. There are also other names for this pattern: "Container and Presentational", "Advanced and Simple".

Read more...

A deep dive into Angular Inputs

At the beginning of the creation of the Angular framework, the angular team made a great choice by going with the component pattern. Based on what is going on in the JavaScript world this a direction all the big players are taking (Vue, React, Svelte). The component seems to perfectly fit the nature of HTML itself. This global movement caused components to be the focal point of the angular framework and that is why they are one of the most complex features of it. You can easily say they are the backbone of every application...

Read more...

Famous Angular forRoot pattern

Standard angular service is called singleton by default, but can you actually call it singleton? The angular dependency injection mechanism is one of the best parts of the framework...

Read more...