Take a peek at my JavaScript below:
$scope.tasks = [
{
"name":"task 1",
"date":"2 May 2014"
},
{"name":"task 2",
"date":"2 May 2014"
}
];
This is how the HTML looks like:
<ul ng-repeat="task in tasks">
<li>{{task.name}}</li>
</ul>
In order to maintain cleaner markup, I want to avoid using {{task.name}}
. I attempted to simplify it with
$scope.tasks = $scope.tasks.name;
in the JavaScript, but unfortunately, it did not work as expected.