I thought I finally understand ng-repeat but now I do not know why the output include the curly bracket and how do I clear the screen after reading the output. Here is part of the output
{"title":"NFL Draft 2020: Over 50 prospects will take part in 'virtual' interviews to air during the event, per report - CBS Sports"}
{"title":"Illinois governor says feds sent wrong type of protective medical masks - CNN"}
but what I really want is just the following without the curly bracket, the word title and the double quotes.
NFL Draft 2020: Over 50 prospects will take part in 'virtual' interviews to air during the event, per report - CBS Sports
and after displaying the list of headlines, I want to clear the screen ( as in "cls" in the command prompt) my angularjs code is this
$http.post('/disdata', " ").then(function(response) {
$scope.answer = response.data;
var titles = [];
for (var i = 0; i < $scope.answer.length; i++) {
titles.push ({
title: $scope.answer[i].title
});
};
$scope.titles = titles;
console.log($scope.titles);
My html is
<div ng-repeat="(key, value) in titles">
{{value}}
</div>