Home »
MCQs »
AngularJS MCQs
Consider the below statement – what will be the output (7)?
61. Consider the below statement – what will be the output?
<div ng-app="" ng-init="num=10">
<p ng-show="num > 5">Displaying: {{num}}</p>
</div>
- Syntax Error
- Nothing will display
- Displaying: 5
- Displaying: 10
Answer: D) Displaying: 10
Explanation:
In the above code, the expression is evaluated with the ng-show which is valid with AngularJS. Thus, the output will be "Displaying: 10".