I want to call the function getCountdown
with two parameters:
- The first (AuctionEnd) is dynamic from a model.
- The second should be hard coded in either
"Time"
or"Status"
.
This is my code:
<ObjectStatus
title="Time"
text="{
parts: [
{path: 'AuctionEnd'},
{path: 'Time'}
],
formatter: '.formatter.getCountdown'
}"
/>
In formatter.js, there is only the first parameter as seen in my console log:
["2016-05-20T12:00:00", undefined]
In JS, I would do it this way:
var AuctionEnd = "2016-05-20T12:00:00";
getCountdown(AuctionEnd, "Time");