ng Flashcards

1
Q

what is ngFor?

A

NgFor is a structural directive in Angular used for rendering lists of items. It iterates over an array or an object and creates a template for each item in the collection. It is commonly used to display dynamic lists in Angular templates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is ngClass?

A

ngClass is a directive in Angular used to dynamically add or remove CSS classes to HTML elements. It allows you to conditionally apply styles based on certain conditions in your component. This directive is useful for dynamically changing the appearance of elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is NgStyle?

A

ngStyle is another Angular directive used to dynamically set CSS styles on an HTML element. It allows you to apply inline styles based on expressions in the component. With ngStyle, you can dynamically change the appearance of elements based on component logic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is NgIf?

A

ngIf is a structural directive in Angular used for conditionally rendering elements in the DOM. It evaluates an expression and only renders the associated template if the expression is true. This directive is handy for showing or hiding elements based on certain conditions in your application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly