How to use useClass with Tree Shakable Services in Angular

Recently, I was asked that how can we use providers such as useClass inside a Tree Shakable service?   By default, Angular services are tree shakable, which means if the application does not use them, they are not part of the final bundle. So, if you create a service using CLI as, ng g s LogContinueContinue reading “How to use useClass with Tree Shakable Services in Angular”

Do Angular useExisting providers create a new object of service?

Short answer is NO, the useExisting provider use object created by other tokens. Read on, To learn more about such concepts, join a free webinar on Saturday, 20 June 4 PM IST. RSVP here: https://www.meetup.com/Geek97/events/271292371/ In Angular, providers determine how an object of a particular token gets created. That means whether Angular creates a newContinueContinue reading “Do Angular useExisting providers create a new object of service?”

How to use Interceptor in Angular

Interceptors are used to intercepts HTTP requests and responses from the application. You can handle them or transform them before passing it on. For example, you can use an interceptor to add authorization token before passing the HTTP request or cache the HTTP response. Some of the usages of interceptors are as follows, Caching ofContinueContinue reading “How to use Interceptor in Angular”

Simplest way to share data between two unrelated Components in Angular

In Angular, it is essential to know how components communicate with each other. If you use a component inside another component, they create a parent child relationship.  In such a scenario, parent and child components communicate to each other in following ways: @Input() @Output() Temp Ref Variable ViewChild and ContentChild You can learn in detailContinueContinue reading “Simplest way to share data between two unrelated Components in Angular”

Simplifying Angular CLI for beginners

So you want to write your first Angular application, however setting up even a ‘Hello World’ Angular application is not easy. It requires many steps such as: Setting up a TypeScript compiler, if you choose to use TypeScript Configuration of Webpack or other module loader Setting up local web development server Installing and configuring dependenciesContinueContinue reading “Simplifying Angular CLI for beginners”

Free Download – Angular Essentials E-Book to help you getting started

Are you new to Angular and just starting with it? Well, I have written a small eBook for you, which you may find useful. You can download it free from here This book does not contain everything of Angular. It just contains topic you need to get started with Angular. In these 10 pages E-Book,ContinueContinue reading “Free Download – Angular Essentials E-Book to help you getting started”

Content Projection in Angular Element with Slot in Angular 7.0

In this article, we will learn how to project content in an Angular Element. If you are unfamiliar with the following, Shadow Dom ViewEncapsulation Content Projection I recommend you read the articles below before moving forward: Understanding ViewEncapsulation in Angular Simplifying Content Projection in Angular   As of now, you know that we use ng-content to carryContinueContinue reading “Content Projection in Angular Element with Slot in Angular 7.0”

Simplifying Angular Data Binding to .NET Developers

Read full article on the Infragistics blog At my job, I get the opportunity to talk to many .NET developers who want to learn Angular. Often, I’ve seen that they bring their .NET skills and work to map that in the learning of Angular. While the effort and drive to learn is there Angular isContinueContinue reading “Simplifying Angular Data Binding to .NET Developers”