added moments library with i18n
This commit is contained in:
3609
package-lock.json
generated
3609
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -37,10 +37,10 @@
|
|||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "^6.0.0",
|
|
||||||
"@angular/core": "^6.0.0",
|
|
||||||
"@angular/compiler": "^6.0.0",
|
|
||||||
"@angular/animations": "^6.0.0",
|
"@angular/animations": "^6.0.0",
|
||||||
|
"@angular/common": "^6.0.0",
|
||||||
|
"@angular/compiler": "^6.0.0",
|
||||||
|
"@angular/core": "^6.0.0",
|
||||||
"@angular/forms": "^6.0.0",
|
"@angular/forms": "^6.0.0",
|
||||||
"@angular/http": "^6.0.0",
|
"@angular/http": "^6.0.0",
|
||||||
"@angular/platform-browser": "^6.0.0",
|
"@angular/platform-browser": "^6.0.0",
|
||||||
@@ -48,6 +48,8 @@
|
|||||||
"@angular/router": "^6.0.0",
|
"@angular/router": "^6.0.0",
|
||||||
"core-js": "^2.5.4",
|
"core-js": "^2.5.4",
|
||||||
"d3": "^5.3.0",
|
"d3": "^5.3.0",
|
||||||
|
"moment": "^2.22.2",
|
||||||
|
"ngx-moment": "^3.1.0",
|
||||||
"rxjs": "^6.0.0",
|
"rxjs": "^6.0.0",
|
||||||
"zone.js": "^0.8.26"
|
"zone.js": "^0.8.26"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -113,9 +113,6 @@
|
|||||||
<a href="#" *ngFor="let item of list.reverse(); let i = index" class="list-group-item d-flex flex-row " (click)="restoreGraph(item)">
|
<a href="#" *ngFor="let item of list.reverse(); let i = index" class="list-group-item d-flex flex-row " (click)="restoreGraph(item)">
|
||||||
<span class="text-muted pr-3">#{{ list.length - i }}</span>
|
<span class="text-muted pr-3">#{{ list.length - i }}</span>
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<div>
|
|
||||||
{{ item.date | date:'HH:mm:ss' }} Uhr
|
|
||||||
</div>
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<span class="badge badge-primary mr-2">
|
<span class="badge badge-primary mr-2">
|
||||||
{{ item.config.nodes }} Knoten
|
{{ item.config.nodes }} Knoten
|
||||||
@@ -124,6 +121,9 @@
|
|||||||
{{ item.config.spread }} Linien
|
{{ item.config.spread }} Linien
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ item.date | amTimeAgo }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ import { ConfigForm } from './forms/config.form';
|
|||||||
import { Component, OnInit, HostListener } from '@angular/core';
|
import { Component, OnInit, HostListener } from '@angular/core';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||||
|
// import { Moment } from 'moment';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
import 'moment/min/locales';
|
||||||
|
|
||||||
import { environment as env } from '../environments/environment';
|
import { environment as env } from '../environments/environment';
|
||||||
import { Param } from './models/param.model';
|
import { Param } from './models/param.model';
|
||||||
@@ -43,8 +46,10 @@ export class AppComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private canvasService: CanvasService,
|
private canvasService: CanvasService,
|
||||||
private historyService: HistoryService
|
private historyService: HistoryService,
|
||||||
) {
|
) {
|
||||||
|
moment.locale('de');
|
||||||
|
|
||||||
this.config = env.formDefaults;
|
this.config = env.formDefaults;
|
||||||
this.configForm = ConfigForm;
|
this.configForm = ConfigForm;
|
||||||
this.list = [];
|
this.list = [];
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
import { MomentModule } from 'ngx-moment';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { GraphsComponent } from './components/graphs.component';
|
import { GraphsComponent } from './components/graphs.component';
|
||||||
@@ -34,6 +35,7 @@ import { HistoryService } from './services/history.service';
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
MomentModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
CanvasService,
|
CanvasService,
|
||||||
@@ -41,4 +43,4 @@ import { HistoryService } from './services/history.service';
|
|||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule {}
|
||||||
|
|||||||
Reference in New Issue
Block a user