mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4713] Add new DecimalNumber Pipe to transform and localize numbers (#4926)
* [ADF-4713] Add new DecimalNumber Pipe to transform and localize numbers * Unsubscribe from userPreference service * Make Pipe impure * Add documentation in localization page
This commit is contained in:
committed by
Eugenio Romano
parent
8ee5cd1908
commit
a0d4160c11
@@ -27,7 +27,8 @@ import {
|
||||
CardViewSelectItemModel,
|
||||
CardViewUpdateService,
|
||||
CardViewMapItemModel,
|
||||
UpdateNotification
|
||||
UpdateNotification,
|
||||
DecimalNumberPipe
|
||||
} from '@alfresco/adf-core';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
@@ -46,7 +47,8 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService) {
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService,
|
||||
private decimalNumberPipe: DecimalNumberPipe) {
|
||||
this.logs = [];
|
||||
this.createCard();
|
||||
}
|
||||
@@ -112,7 +114,8 @@ export class CardViewComponent implements OnInit, OnDestroy {
|
||||
value: 9.9,
|
||||
key: 'float',
|
||||
default: 0.0,
|
||||
editable: this.isEditable
|
||||
editable: this.isEditable,
|
||||
pipes: [{ pipe: this.decimalNumberPipe}]
|
||||
}),
|
||||
new CardViewKeyValuePairsItemModel({
|
||||
label: 'CardView Key-Value Pairs Item',
|
||||
|
Reference in New Issue
Block a user