Explaining the setup of my app in HTML:
<div ng-app="md-app">
<div id="general">
<ng-include src="template1" ng-controller="GeneralCtrl"></ng-include>
</div>
</div>
The JavaScript function to fetch a person from a REST API and assign a template:
function GeneralCtrl($scope, $http, $location) {
$scope.template1 = 'some_path';
$scope.person = $http.get('route', {id: personId})).then(function(response){
return response.data;
});
}
Within the template, all data is displayed. There is also a form for editing some of the person's data, but it is initially set to be read-only:
<form>
<div class="form-group">
<input type="text" class="form-control" ng-model="person.nick"/>
</div>
</form>
Although the person's nickname is shown in the input field, I am unable to edit it. Typing seems to have no effect. What could be causing this issue?