install date moment in angular code example
Example 1: angular moment
npm install --save moment
...
import * as moment from 'moment';
Example 2: moment use in angular
npm install --save moment
import * as moment from 'moment';
...
let myMoment: moment.Moment = moment("someDate");