Numbers
replaceComma
Coerce a decimal-comma value.
Use it in your component
Standalone component
import { Component } from '@angular/core';
import { ReplaceCommaPipe } from 'extra-pipe';
@Component({
standalone: true,
imports: [ReplaceCommaPipe],
template: `{{ '12,5' | replaceComma }}`,
})
export class ExampleComponent {
}
Template
{{ '12,5' | replaceComma }}
Try it live.
The output below runs the packed library. Edit data, not code.
Use double quotes for text, or a number, array, object or null.
No parameters: use []. Locale is controlled separately.
This pipe has no locale override.
Live template data
readonly value = "12,5";
{{ value | replaceComma }}
Rendered output
12.5