I am trying to print momentjs object not ISO8601 string within angularjs templates.
let's say I have something i.e
$scope.time = moment();
and in my template when I do the following
<span ng-bind="time"></span>
or <span>{{time}}</span>
I guess what I am trying to do is to avoid calling momentjs toString()
or .toJSON()
object which might be triggers by {{}}
, however, I do not want to override those function that are chained onto moments prototype.
<span ng-bind="demo.$time.toObject()|json"></span>