I have a questions about using the amDifference filter in angular-moment.
Currently I have it set up like this:
{{order.shipDate | amDifference: null: 'days'}}
Which is calculating the difference between the ship date and the current date, but it is backwards with what I need if for. For example, if my shipDate was on 12/05/2015 it is currently showing '-81', but I would like for it to show '81'. So I guess something like this:
{{currentDate | amDifference: order.shipDate: 'days'}}
I have already tried this:
{{null | amDifference: order.shipDate: 'days'}}
Which didn't work.
So I guess I want to know:
Thanks so much!
Just set a variable for today
in controller
$scope.today = new Date();
Then do
<td>{{ today | amDifference: order.shipDate : 'days'}} days</td>