Explain me what is the difference between ng-show/ng-hide and ng-if directives?
Submitted by: Muhammadng-show/ng-hide will always insert the DOM element, but will display/hide it based on the condition. ng-if will not insert the DOM element until the condition is not fulfilled.
ng-if is better when we needed the DOM to be loaded conditionally, as it will help load page bit faster compared to ng-show/ng-hide.
We only need to keep in mind what the difference between these directives is, so deciding which one to use totally depends on the task requirements.
Submitted by: Muhammad
ng-if is better when we needed the DOM to be loaded conditionally, as it will help load page bit faster compared to ng-show/ng-hide.
We only need to keep in mind what the difference between these directives is, so deciding which one to use totally depends on the task requirements.
Submitted by: Muhammad
Read Online AngularJS Developer Job Interview Questions And Answers
Top AngularJS Developer Questions
☺ | Please explain what is Angular Expression? Explain what is key difference between angular expressions and JavaScript expressions? |
☺ | Explain on which types of component can we create a custom directive? |
☺ | Tell me what is AngularJS? |
☺ | Tell me how does the digest phase work? |
☺ | what is DI (Dependency Injection ) and how an object or function can get a hold of its dependencies? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | jQuery Mobile Interview Questions. |