{

Welcome to my blog !


How to detect @input() bindings changes in Angular?

May 9, 2022 ·  2 min read

It is a short tutorial on how to detect when an @input changes. @input is an angular decorator that helps us with property binding for an input. So input name implies that it is input data passed to the component. @input adds metadata to the angular component for property binding and allows the addition of it to the DOM element. @input directive used in the following things Passing data from child to parent or vice versa Passing data as input to component @input is a directive from the @angular/core module, So you have to import it to use in the Angular component....

How to declare an array of objects in Angular|typescript

May 9, 2022 ·  3 min read

This example covers the Angular example in typescript. Declare and Initialize an array of objects with values Array of Type Using an interface to hold an array of objects An array of objects is populated and displayed on the Dropdown or radio button display. There are multiple ways we can create an array of objects. How to declare and Initialize an array of objects with values Declare and initialize an array using the any/object type declared as follows...

How to create an angular model class or interface in Angular?

May 9, 2022 ·  4 min read

In this post, This post covers a step-by-step tutorial in Angular. How to create a model class in an angular application using CLI or manually? How to generate a model interface in a typescript application using CLI or manually? When to use class or interfaces for models in Angular applications? Initialize the model class with an array of objects in typescript Display model classes data in the angular template file Angular is a front-end UI framework that holds the information from the browser and sends it to Database....

Angular raw html binding |innerHtml example

May 9, 2022 ·  3 min read

This tutorial solves the below problems in the HTML binding Angular application. How to do string raw HTML binding in Angular? Render HTML strings with HTML tags How innerHtml attribute in Angular work? How to sanitize HTML tag content with DomSanitizer innerhtml change event handler exam In Angular, It is simple to bind the properties and events using two-way binding syntax. Property binding can be done using the below syntax....

Angular ngFor index - How to get current last even and odd index?

May 9, 2022 ·  2 min read

This tutorial explains how to get the current last even and odd index with ngfor in angular. Let’s create an employee model. export class Employee { id: Number; name: string; salary: Number; } Angular ngFor Index syntax and example *ngFor is a shorthand form for ngForOf directive This can be used to iterate an array of objects or objects. Here is a ngFor syntax <div *ngFor="let object of objectarray; let i=index;"> {{i}}/{{users....

Subscribe
You'll get a notification every time a post gets published here.