Is there a way in Angular to keep the hero name consistent whenever I enter a new name in the input field?
<div>I want a fix name: {{hero.name}}</div>
<div>
<label>name:
<input [(ngModel)]="hero.name" placeholder="name">
</label>
</div>
I've heard of one-way binding, but I can't figure out how to achieve this specific scenario.