Encountering a strange issue with AngularJS 1.4 (TypeScript). The problem lies within the controller where a variable is set and displayed in an input text box. Oddly, when attempting to edit the value in this text box and clicking on a button, the variable's value remains unchanged(!).
HTML view
<div class="form-group">
<label>Title</label>
<input class="form-control" ng-model="serviceTitle">
</div>
<div class="form-group">
<button class="btn btn-primary" ng-click="updateServiceIdentification()">Update Service Identification</button>
</div>
Controller:
$scope.serviceTitle = "Test";
$scope.updateServiceIdentification = ()=> {
// despite changes in view, variable retains initial value of "Test"????
alert($scope.serviceTitle);
}
If a test label is added in HTML view
<h1>{{serviceTitle}}</h1>
value modification in input text box successfully updates this label.