Angular *ngSwitch Directive

In this article, we’ll see how can we use ngSwitch directive in angular application. ngSwitch is a structural directive that adds or removes templates when the next match expression matches the switch expression. Using ngSwitch ngSwitch is used to display one element from set of elements based on the condition. ngSwitch also contains related structural directive … Read moreAngular *ngSwitch Directive

Angular *ngFor directive example

In this article, we’ll see how to use angular’s ngFor directive. ngFor is angular’s builtin structural directive which renders a template for each item of the supplied array. Example Now let’s see how to use it. import { Component } from ‘@angular/core’;<br /> <br />@Component({<br /> selector: ‘app-demo’,<br /> template: `<br /> &lt;ul&gt;<br /> &lt;li … Read moreAngular *ngFor directive example