I have an array in my controller containing date-objects called $scope.events. I would like to iterate these events and and print them out in a certain format, which I use momentjs for.
Now the thing is, I cannot get it to actually use momentjs.
I have tried the following:
<table>
<tr ng-repeat="ev in events">
<td>{{ moment(ev).format("HH") }}</td>
</tr>
</table>
but this just prints an empty cell.
So my question is, how do I use javascript, momentjs, inline in my angular-binding ?
thanks
Thomas
momentis declared as a member of$scope:$scope.moment = moment;.<td>{{ moment(ev) | date 'HH' }}</td>wheremomentunder$scope