I'm using Angular JS to try and update the value of a <textarea> using a $http request after a link is clicked to fetch some content in my controllers.js as shown here:
$scope.setDocument = function(docId) {
$http.get('docs/' + docId + '.json').success(function(data) {
$scope.content = data.docData;
console.log('setting document: ' + data.docData);
});
}
the log statement shows the right document data, but the result is not rendered in the text area on the browser:
<textarea id="main-writer" ng-model="content" class="row-fluid" autofocus="true" cols="48" rows="24"></textarea>
What am I missing here?