I grasp the concept that ng-model
generates a property that corresponds to the {{name}}
.
How does AngularJS distinguish between the {{name}}
derived from the ng-model
and the {{name}}
originating from the ng-repeat
/ng-init
?
<section class="section">
<div class="container" data-ng-init="names=['Conner', 'Bryan', 'Cathy', 'Jim']">
<div class="row">
<em>Type your name: </em> <input type="text" data-ng-model="name">
<h4>{{name}}</h4>
<ul>
<li data-ng-repeat="name in names"> {{name}} </li>
</ul>
</div>
</div>
</section>
Additionally, am I allowed to select any placeholder text for the ng-repeat
name?