My output looks like this:
- {"name":"John"}
- {"name":"Mark"}
Is there a way to display it without the surrounding curly braces and quotes?
- John
- Mark
This is how I have set up my view:
<body ng-controller="MainCtrl">
<ul>
<li ng-repeat="name in names">
{{name}}
</li>
</ul>
</body>
...and here is my controller code:
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.names = {
"1": {
"name": "John"
},
"2": {
"name": "Mark"
}
};
});
View my Plunker demo here: http://plnkr.co/edit/hnjoPH0r9xhlvMzO93Ts?p=preview