Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Human readable pipe using Moment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
minuscorp committed Apr 17, 2018
1 parent c74bd97 commit 417cd5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@types/moment": "^2.13.0",
"core-js": "^2.4.1",
"ngx-moment": "^2.0.0-rc.0",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
Expand Down
3 changes: 3 additions & 0 deletions web/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {MatCardModule} from '@angular/material/card';
import {MatIconModule} from '@angular/material/icon';
import {MatTableModule} from '@angular/material/table';
import {BrowserModule} from '@angular/platform-browser';
import {MomentModule} from 'ngx-moment';

import {AppRoutingModule} from './/app-routing.module';
import {AppComponent} from './app.component';
Expand All @@ -20,6 +21,8 @@ import {DataService} from './services/data.service';
MatCardModule,
MatTableModule,
MatIconModule,
/** Third-Party Module Imports */
MomentModule,
],
providers: [DataService],
bootstrap: [AppComponent]
Expand Down
3 changes: 1 addition & 2 deletions web/app/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<!-- Latest Build Column -->
<ng-container matColumnDef="latestBuild">
<mat-header-cell *matHeaderCellDef>Latest Build</mat-header-cell>
<!-- TODO: Pipe this into a relative time pipe -->
<mat-cell *matCellDef="let project">{{project.latestDate | date: 'fullDate'}}</mat-cell>
<mat-cell *matCellDef="let project">{{project.latestDate | amTimeAgo }}</mat-cell>
</ng-container>

<!-- TODO: Add Repo Column -->
Expand Down

0 comments on commit 417cd5f

Please sign in to comment.