diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 687757f..9ea2423 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,7 +13,11 @@ import { MatToolbarModule} from '@angular/material/toolbar'; import { MatDialogModule} from '@angular/material/dialog'; import {MatTabsModule} from '@angular/material/tabs'; import { FormsModule } from '@angular/forms'; - +import { LOCALE_ID } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { registerLocaleData } from '@angular/common'; +import localeFr from '@angular/common/locales/fr'; +registerLocaleData(localeFr); import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { WebsocketService } from './websocket.service'; @@ -57,7 +61,9 @@ import { NgChartsModule } from 'ng2-charts'; MatTableModule, NgChartsModule ], - providers: [], + providers: [ + { provide: LOCALE_ID, useValue: 'fr-FR'}, + ], bootstrap: [AppComponent] }) export class AppModule { diff --git a/src/app/prop/prop.component.html b/src/app/prop/prop.component.html index 74ae528..8c89cd5 100644 --- a/src/app/prop/prop.component.html +++ b/src/app/prop/prop.component.html @@ -57,14 +57,14 @@ - - + + - + diff --git a/src/datastructure/elt.ts b/src/datastructure/elt.ts index 0a8213e..68cbfab 100644 --- a/src/datastructure/elt.ts +++ b/src/datastructure/elt.ts @@ -1,19 +1,31 @@ + export class Elt { label: string=''; value: string | number | boolean = false; + valueN:number=0; min: number=0; max: number=0; step: number=0; order: string=''; + isNumber(val: any): boolean { + return typeof val === 'number'; + } + setValue (json:any) { if (json) { this.value=json['value']; + if (this.isNumber(json['value'])) { + this.valueN=json['value']; + } } } setAll (json:any) { if (json) { this.label=json['elementLabel']; this.value=json['value']; + if (this.isNumber(json['value'])) { + this.valueN=json['value']; + } this.min=json['min']; this.max=json['max']; this.step=json['step'];