Explain directives ng-if, ng-switch and ng-repeat?



Explain directives ng-if, ng-switch and ng-repeat?..

Answer / chaitanya

ng-if – This directive can add / remove HTML elements from the DOM based on an expression. If the expression is true, it add HTML elements to DOM, otherwise HTML elements are removed from the DOM.

ng-switch – This directive can add / remove HTML elements from the DOM conditionally based on scope expression.

ng-repeat - This directive is used to iterate over a collection of items and generate HTML from it.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More AngularJS Interview Questions

In angular 2 module consist of what arrays?

0 Answers  


What is difference between ng bind and expression?

0 Answers  


Why do we use angular material?

0 Answers  


What is ivy in angular?

0 Answers  


How to handle xss vulnerability scenarios in angularjs?

0 Answers  






What are promises in angularjs?

0 Answers  


Is angularjs a library, framework, plugin or browser extension?

0 Answers  


What is event distner and host distner in angular?

0 Answers  


What is async pipe?

0 Answers  


Global variables in angularjs?

0 Answers  


What are ng-repeat special variables?

1 Answers  


What is angular framework?

0 Answers  


Categories