Consider the below statement, how to print the value of 'StudentName'?

21. Consider the below statement, how to print the value of "StudentName"?

<div ng-app="" ng-init="firstName='John'">
	<p>Input something in the input box:</p>
	<p>Name: <input type="text" ng-model="StudentName"></p>
	<p>You wrote: _______</p>
</div>
  1. StudentName
  2. {{ StudentName }}
  3. { StudentName }
  4. { _StudentName }

Answer: B) {{ StudentName }}

Explanation:

The code is:

<div ng-app="" ng-init="firstName='John'">
	<p>Input something in the input box:</p>
	<p>Name: <input type="text" ng-model="StudentName"></p>
	<p>You wrote: {{ StudentName }}</p>
</div>

Comments and Discussions!

Load comments ↻






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