Skip to content

Commit 45c1be4

Browse files
committed
Add ngFor feature questions
1 parent 980ee33 commit 45c1be4

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,14 @@
208208
|200| [What is the purpose of hidden property?](#what-is-the-purpose-of-hidden-property)|
209209
|201| [What is the difference between ngIf and hidden property?](#what-is-the-difference-between-ngif-and-hidden-property)|
210210
|202| [What is slice pipe?](#what-is-slice-pipe)|
211+
|203| [What is index property in ngFor directive?](#what-is-index-property-in-ngfor-directive)|
212+
|204| [What is the purpose of ngFor trackBy?](#what-is-the-purpose-of-ngfor-trackby)|
213+
|205| [](#)|
214+
|206| [](#)|
215+
|207| [](#)|
216+
|208| [](#)|
217+
|209| [](#)|
218+
|210| [](#)|
211219

212220
1. ### What is Angular Framework?
213221

@@ -3069,4 +3077,40 @@
30693077
}
30703078
```
30713079
3080+
**[⬆ Back to Top](#table-of-contents)**
3081+
3082+
203. ### What is index property in ngFor directive?
3083+
The index property of the NgFor directive is used to return the zero-based index of the item in each iteration. You can capture the index in a template input variable and use it in the template. For example, you can capture the index in a variable named indexVar and displays it with the todo's name using ngFor directive as below.
3084+
```javascript
3085+
<div *ngFor="let todo of todos; let i=index">{{i + 1}} - {{todo.name}}</div>
3086+
```
3087+
3088+
**[⬆ Back to Top](#table-of-contents)**
3089+
3090+
204. ### What is the purpose of ngFor trackBy?
3091+
3092+
**[⬆ Back to Top](#table-of-contents)**
3093+
3094+
205. ### ?
3095+
3096+
**[⬆ Back to Top](#table-of-contents)**
3097+
3098+
206. ### ?
3099+
3100+
**[⬆ Back to Top](#table-of-contents)**
3101+
3102+
207. ### ?
3103+
3104+
**[⬆ Back to Top](#table-of-contents)**
3105+
3106+
208. ### ?
3107+
3108+
**[⬆ Back to Top](#table-of-contents)**
3109+
3110+
209. ### ?
3111+
3112+
**[⬆ Back to Top](#table-of-contents)**
3113+
3114+
210. ### ?
3115+
30723116
**[⬆ Back to Top](#table-of-contents)**

0 commit comments

Comments
 (0)