Author: Deepak Talwar

post
Promise

Deepak Talwar : Content Projection in Angular- ContentChild, ContentChildren

Deepak Talwar : ContentChild and ContentChildren are property decorators. They are used to query or helps to get a reference to the projected content.Content Child and Content Children are used to getting the reference of the projected content.Projected content means the content that the component receives from the...

post
Decorator

Deepak Talwar : Content Projection in Angular- ng-content, ng-container, ngTemplateOutlet directive, TemplateRef

Deepak Talwar : Content Projection is a method of passing HTML material from the parent to the child component.The Received template will be shown in a specific location by the child component, by using the ng-content element.The ng-content element is used to identify a location in the template of the child compone...

post
Hooks

Deepak Talwar : Angular Child Component Lifecycle Hooks- ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked

Deepak Talwar :  Lifecycle hooks are a set of methods in Angular that are executed at specific moments during the lifecycle of a component. By using these methods, one can execute custom logic or activities at certain points in the Angular component lifecycle.Lifecycle hooks are timed methods. The reasons and ...

post
DOM manipulation

Deepak Talwar : DOM manipulation in Angular Using DOM queries @ViewChild and @ViewChildren Decorators, ChangeDetectorRef

Deepak Talwar : DOM queries mechanism are provides by Angular. It comes in the form of @ViewChild and @ViewChildren decorators. Both behave the same, only the former returns one reference, while the latter returns multiple references as a QueryList object.@ViewChild decoratorsIts a property decorator. It provides a...

post
Subjects

Deepak Talwar : Using Subject in Angular

Deepak Talwar : Creating a Subject const chatSubject = new Subject();Add More subscriber in Same SubjectMultiple subscriptions can be created and internally the subject will keep a list of subscriptions:const subscription1 = chatSubject.subscribe(message => {    console.log('Component 2 Received:'...

post
Observable

Deepak Talwar : Promises vs Observables vs Subjects

Deepak Talwar : Promises:Promises are a basic component of JavaScript that allow for the handling of asynchronous operations. A Promise offers a value that may be available now, later, or never.Features of Promises:Single Value: Promises are single values that will either be resolved or rejcted.Immutable State: A P...

post
Subjects

Deepak Talwar : RxJS Subjects in Angular

Deepak Talwar : The Subjects in RxJS are special observable which acts as both observer & observable.Subjects enable us to emit new values to the observable stream using the next method. On Other hand, each subscriber, who subscribe to the subject will receive the identical instance of the subject and, the same...

post
Promise

Deepak Talwar : Working with Promise in Angular

Deepak Talwar : How Promises WorkPromises work by providing a way to handle the result of an asynchronous operation once it is complete. When a promise is created, it is in the pending state. Once the asynchronous operation is complete, the promise is either fulfilled or rejected.If the promise is fulfilled, the re...

post
Subscription

Deepak Talwar : Handle Subscriptions in Angular

Deepak Talwar : Why We Need to Handle Subscription?A lack of subscription handling can cause a variety of issues in your software, the most serious of which is memory leak.1. Unsubscribing Manually:import { Component, Input, OnInit, OnDestroy } from '@angular/core';import { from, Observable, of, Subscription } from...

post
Subscription

Deepak Talwar : RxJS Subscription

Deepak Talwar : Observables are a means of transmitting information or events or data between different components of an application.Its an object that emits items over time, either synchronously or asynchronously.In turn, a Subscription is how we access this data! Subscription typically refers to an agreement to r...

Deepak Talwar: & More

About Us

Community of IT Professionals

A Complete IT knowledgebase for any kind of Software Language, Development, Programming, Coding, Designing, Networking, Hardware and Digital Marketing.

Instagram