Reusing components with Content Projection in Angular

Want to change the content inside your component and re-use them? Well, That is what we use Content Projection for, in Angular. Let us start by defining what Content Projection is. A feature with the help of which we can have a component with a kind of visual wrapper, and the content inside that wrapper… Continue reading Reusing components with Content Projection in Angular

What is a Shared Module?

In Angular, we can create different feature modules for every feature. Each one of these features would require importing the CommonModule and other imports too. Do we really want to repeat all this for every feature module? Or do we have an alternative? Yes, We can define a Shared Module. A Shared Module is used… Continue reading What is a Shared Module?

Understanding Services and Dependency Injection

We’ve all worked with Components and used component communication, but what do we do if we want to share data or logic across components? WE BUILD SERVICES. Let us try to understand what exactly services are. So, a service is basically a class, but with a focused purpose. With services, the code becomes easy to… Continue reading Understanding Services and Dependency Injection

Modules in Angular

What is an Angular Module? A class with an @NgModule decorator which organizes the pieces of an application and extend our application with capabilities from the external libraries. To start with, every angular application has a root application module, called AppModule and a root application component, called AppComponent. The AppModule bootstraps the AppComponent. Looks like… Continue reading Modules in Angular

Using Template Reference variable in Angular

In this article, we will discuss the use of a template reference variable for component communication. A template reference variable is used to give reference to a DOM Element, a component, directive, or a web component within a template. This variable can then be used anywhere inside the template. This is done using a # symbol inside… Continue reading Using Template Reference variable in Angular

REACTIVE FORMS FOR BEGINNERS

In Angular, there are two types of forms: — Template Driven Forms — Reactive Forms If you are new to forms, understand these here. In this blog post, we will learn how to create custom validators for Angular Reactive Forms. So, to start with, I assume that you have already created a project using ng new. Now, suppose we have… Continue reading REACTIVE FORMS FOR BEGINNERS

Add Bootstrap to your Angular CLI Project

This article will help us understand the usage of bootstrap framework within Angular. To understand a little about bootstrap, Bootstrap is the most popular HTML, CSS, and JavaScript framework for web front-end development. It’s great for developing responsive, mobile-first web sites. Bootstrap in Angular Step 1. Create a new Angular Project So, to apply bootstrap to… Continue reading Add Bootstrap to your Angular CLI Project