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>
  1. Syntax Error
  2. Nothing will display
  3. Displaying: 5
  4. 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".

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.