How to make custom directive in Angular?

Before creating a custom directive, we need to understand what a directive is in Angular. “Directives are classes that add additional behavior to elements in your Angular applications.” “Use Angular’s built-in directives to manage forms, lists, styles, and what users see.” The different types of Angular directives are as follows: Directive Types Details Components Used…

Read More

What is Data Binding in Angular?

It’s a way of communication between TypeScript code and HTML template. Let’s see an example below. I created a component called “user”. We have a variable that stores the value of the “username” and a method that resets this value, it’s a method triggered by a click event in the HTML template. In the HTML…

Read More

The two Axes of Flexbox

Flexbox is widely used nowadays, as it is possible to create complex and flexible layouts in a simple way. Before Flexbox existed, it was more complex to create layouts. Introduction We have two directions: row and column. We can specify the direction using the flex-direction property. There are two axes: the main axis and the…

Read More