diff --git a/frontend/package.json b/frontend/package.json index 8c61b993..9595d765 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -38,6 +38,7 @@ "ng2-charts": "^2.3.0", "ngx-dropzone": "^3.1.0", "ngx-highlightjs": "^7.0.1", + "ngx-moment": "^6.0.2", "observable-webworker": "^4.0.1", "pouchdb": "^7.3.0", "pouchdb-authentication": "^1.1.3", diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 472d8161..e8e86f52 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -24,6 +24,7 @@ import {Router} from '@angular/router'; import { SourceDetailComponent } from './pages/source-detail/source-detail.component'; import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs'; import {AuthInterceptorService} from './services/auth-interceptor.service'; +import { MomentModule } from 'ngx-moment'; @NgModule({ declarations: [ @@ -47,7 +48,8 @@ import {AuthInterceptorService} from './services/auth-interceptor.service'; NgbModule, ChartsModule, NgxDropzoneModule, - HighlightModule + HighlightModule, + MomentModule ], providers: [ { diff --git a/frontend/src/app/pages/dashboard/dashboard.component.html b/frontend/src/app/pages/dashboard/dashboard.component.html index 289a684f..128b71d1 100644 --- a/frontend/src/app/pages/dashboard/dashboard.component.html +++ b/frontend/src/app/pages/dashboard/dashboard.component.html @@ -155,8 +155,8 @@
status:
{{isActive(source)}}
last updated:
{{source.updated_at | date}}
expires:
{{source.expires_at}}
last updated:
{{source.updated_at | amTimeAgo}}
expires:
{{source.expires_at | amFromUnix | amTimeAgo}}