How I define my app in html:
<div ng-app="md-app">
<div id="general">
<ng-include src="template1" ng-controller="GeneralCtrl"></ng-include>
</div>
</div>
The js to fetch a person from rest and set template:
function GeneralCtrl($scope, $http, $location) {
$scope.template1 = 'some_path';
$scope.person = $http.get('route', {id: personId})).then(function(response){
return response.data;
});
}
In the template I can read all data. I have a form to edit some data of the person, however the form is readonly by default:
<form>
<div class="form-group">
<input type="text" class="form-control" ng-model="person.nick"/>
</div>
</form>
The nickname of the person is displayed in the input field, but I cannot edit it. When I start typing it is just ignored. Why?