You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -758,19 +758,19 @@ You can download the PDF and Epub version of this repository from the latest run
758
758
759
759
**[⬆ Back to Top](#table-of-contents)**
760
760
761
-
21. ### What is the purpose of ngFor directive?
762
-
We use Angular ngFor directive in the template to display each item in the list. For example, here we iterate over list of users,
761
+
21. ### What is the purpose of `*ngFor` directive?
762
+
We use Angular `*ngFor` directive in the template to display each item in the list. For example, here we can iterate over a list of users:
763
763
```html
764
764
<li *ngFor="let user of users">
765
765
{{ user }}
766
766
</li>
767
767
```
768
-
The user variable in the ngFor double-quoted instruction is a **template input variable**
768
+
The user variable in the `*ngFor` double-quoted instruction is a **template input variable**.
769
769
770
770
**[⬆ Back to Top](#table-of-contents)**
771
771
772
-
22. ### What is the purpose of ngIf directive?
773
-
Sometimes an app needs to display a view or a portion of a view only under specific circumstances. The Angular ngIf directive inserts or removes an element based on a truthy/falsy condition. Let's take an example to display a message if the user age is more than 18,
772
+
22. ### What is the purpose of `*ngIf` directive?
773
+
Sometimes an app needs to display a view or a portion of a view only under specific circumstances. The Angular `*ngIf` directive inserts or removes an element based on a truthy/falsy condition. Let's take an example to display a message if the user age is more than 18:
774
774
```html
775
775
<p *ngIf="user.age > 18">You are not eligible for student pass!</p>
0 commit comments