Angular 16 is packed with many exciting features. You can read some of them here: Angular 16 Introduction What is the purpose of the Second Parameter in creating an Angular Signal? Required @Input properties in Angular In this blog post, we will learn about- Passing Route Data as Component Input, one of the features ofContinueContinue reading “Passing Route Data as Component Input in Angular”
Tag Archives: angular 16
Hello Angular 16
On 3rd May 2023, Angular 16 is launched. Some of the essential features of Angular 16 are, Improved standalone APIs Angular Signals takeUntillDestrory RxJS operator DestroyRef as an injectable provider Required input properties for directives Passing router data as a component input Self-closing tags ES Build support Nondestructive hydration for SSR Unit Testing with JestContinueContinue reading “Hello Angular 16”
What is the purpose of the Second Parameter in creating an Angular Signal?
The angular signal() function creates a signal. This function takes two input parameters. Initial value Optional Equality function. By default, Angular executes the code of effect() even if the signal is set or updated with the same value. How can we avoid that? By leveraging the second parameter of the signal() function. Let usContinueContinue reading “What is the purpose of the Second Parameter in creating an Angular Signal?”
How to Lazy and Dynamically Load a Component in Angular
There are three ways you can use a component in an Angular app. Loading on route change Using as a child component Dynamically loading on demand However, this article focuses on loading a component dynamically and lazily. The main advantage of lazily loading a component is reducing the initial bundle size and only downloading theContinueContinue reading “How to Lazy and Dynamically Load a Component in Angular”
Required @Input properties in Angular
Angular 16 adds a new future of making an @Input() decorated property REQUIRED, which means that to use that component, the value of the required property has to be passed. @Input({required:true}) title? :string; To Understand it, let us assume that you have a component named ProductComponent with @Input() decorated properties as shown below, const templateContinueContinue reading “Required @Input properties in Angular”