Creating/building/trying an Angular library

Angular library

A library is a reusable plugin, to help us in some tasks within our project.We can start by simply using this command: And generate our library in project, named calc-lib in this case. With it, we’ll see our angular.json modiefied with one more project of type: library. It will also […]

Read More…

EventEmitters across components without Parent-Child in Angular

Angular EventEmitters and components.

In this scenario we have no connection between two components and we want to implement EventEmitters via two different components. If you have parent/child scenario you can useĀ @Input, @Output system of angular (explained in other places). In Angular, communication between components is crucial for building dynamic and interactive applications. While […]

Read More…

Mastering custom validation in Angular with Reactive Forms

Angular’s Reactive Forms offer a robust framework for building dynamic and data-driven forms and custom validation. While built-in validators like required and email handle common scenarios, complex applications often require validation rules. This article delves into creating custom validators in Angular, empowering you to tailor form validation to your specific […]

Read More…

Compare 2 or more JS arrays

Compare 2 or more arrays

Sometimes can be useful an efficient way to compare more JS arrays of objects or primitives. In these cases, the simple comparison operator is not enough because arrays are two different instances of objects. We have to compare JS arrays that are lists and not simple objects. Manipulating data often […]

Read More…

Angular recursion pipe

Sometimes it can happen that the data comes to us instead in the form of a tree, with objects that contain lists of other objects, which in turn contain lists of other objects.In this case, we can think of starting with the recursion on the data, to modify them in […]

Read More…