Skip to content
sneppets

sneppets

  • Privacy
display different colors for odd/even rows using ngFor loop and ngClass

Display different colors for odd/even rows using ngFor loop and ngClass

August 24, 2020September 17, 2020 Editorial Staff1 Comment on Display different colors for odd/even rows using ngFor loop and ngClass

This tutorial guides you on how to display different colors for odd/even rows using ngFor loop and ngClass in Angular 9. Let’s see in our example, how to style elements with an even index in different color than the elements… Read More!

Angular angular, angular-9, NgClass, ngFor
ngFor loop with index, first and last element angular

Angular 9 : ngFor loop with index, first and last element: Example

August 23, 2020August 24, 2020 Editorial StaffLeave a Comment on Angular 9 : ngFor loop with index, first and last element: Example

This tutorial guides you on how to use ngFor loop with index, first and last options in Angular 9. Let’s see an angular example to get the index of each element and first and last element of the list.

Angular angular, angular-9, first, index, last, ngFor
display json object using ngfor directive angular

How to display JSON object using ngFor directive : Angular 9

August 23, 2020August 24, 2020 Editorial StaffLeave a Comment on How to display JSON object using ngFor directive : Angular 9

This tutorial guides you on how to display JSON object using ngFor directive in Angular 9. In this tutorial example let’s see how to use JSON response from REST API and display data in the component’s template.

Angular angular, directive, json, json-array, json-object, ngFor
dynamic and conditional CSS classes with ngClass angular 9

Angular 9 : Dynamic and conditional CSS classes with ngClass

August 20, 2020August 23, 2020 Editorial StaffLeave a Comment on Angular 9 : Dynamic and conditional CSS classes with ngClass

This tutorial guides you on how to apply dynamic and conditional CSS classes with ngClass in Angular 9. NgClass is a built-in directive which can be used to add and remove CSS classes dynamically and conditionally on an HTML element.

Angular angular, angular-9, CSS, NgClass
apply css style attribute dynamically ngstyle angular 9

Apply CSS style attribute dynamically with ngStyle : Angular 9

August 20, 2020August 20, 2020 Editorial StaffLeave a Comment on Apply CSS style attribute dynamically with ngStyle : Angular 9

This tutorial guides you on how to apply CSS style attribute dynamically with ngStyle in Angular 9. Unlike structural directives (NgIf), attribute directives (NgStyle) don’t add or remove elements. But they can be used to style elements dynamically.

Angular angular, angular-9, CSS, ngStyle

Posts navigation

Older posts
Newer posts
Copyright © 2018 Sneppets. All Rights Reserved