Posted On: Feb 22, 2018
The ngFor directive instantiates a template for every element of the given iterator. The different local variables of the ngFor directive can be used in iterations. The ngFor directive can even be used with the HTML elements. It also performs various changes in DOM. Several exported values can be aliased to local variables with the help of ngFor directive. It allows us to build data presentation lists and tables in our HTML templates. Here’s an example of ngFor directive with the help of HTML:
<tr *ngFor="hero of heroes">
<td>({hero.name})</td></tr>
Never Miss an Articles from us.
A decorator is the core concept when developing an angular framework with version 2 and above. It may become a core lang..
Components are just simple classes which are declared as components with the help of component decorators. It becomes e..
Here are the elements which are present in the component directory structure anf modules:-module.ts- in this, the angu..