Incremental DOM is used internally at Google, and it is defined by this key idea: Every component gets compiled into a series of instructions. These instructions create DOM trees and update them in-place when the data changes. For instance, the following component: Will be compiled into: The template function contains the instructions rendering and updating… Continue reading Incremental DOM with IVY in Angular
Injectable decorator (@Injectable) marks a class as available to Injector for creation. The service itself is a class that the CLI generated and that’s decorated with @Injectable(). What exactly does providedIn do? Determines which injectors will provide the injectable, by either associating it with an @NgModule or other InjectorType, or by specifying that this injectable… Continue reading What is Injectable decorator?
There are two ways to make a service a singleton in Angular: Set the providedIn property of the @Injectable() to “root”. Include the service in the AppModule or in a module that is only imported by the AppModule
First, let’s understand a few key terms and I will also include references to articles if you need a deeper understanding of these concepts: Ivy — It is the code name for Angular’s next-generation compilation and rendering pipeline. Read here and for in-depth functioning and reasoning, check this article out. Tree shake — Popular term used to refer to a step during the build process… Continue reading A gentle introduction into tree shaking in Angular Ivy
I am just writing a small code that will help fellow developers to pass an object after the dialog is closed.
@Decorators are a design pattern that is used to separate modification or decoration of a class without modifying the original source code. Here is a list of @Decorators available in Angular. @NgModule @Component @Injectable @Directive @Pipe @Input @Output @HostBinding @HostListener @ContentChild @ContentChildren @ViewChild @ViewChildren @NgModule:@NgModule decorator is very common in angular. It can be seen… Continue reading @Decorators available in Angular
We can add query params in url simply by following simple rule. With typescript we can do the same as below.
We can use route feature of angular to move from one component to another. The template way of using the route feature is as below. We can route from `.ts` file using router navigate. In order to route from ts file you need to import Router from `@angular/router` and to make it available in our… Continue reading Angular route using route params
This is how we query from mongodb collection to fetch data with total length, offset and limit. For total length we need to use async.