var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstName = false;
$scope.toggle = function(){
$scope.firstName = !$scope.firstName;
};
});
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<button ng-click=toggle()>ToGgLe</button>
<input type="text" ng-disabled="{{firstName}}">
</div>
</body>
</html>
Trying to implement a toggle function for an input field using AngularJS. While the value changes in the DOM, the input field is not rendering properly. Seeking assistance to resolve the issue. Thank you.