How to import Angular 'number' pipe for standalone components
If you have angular template code such as
{{myNum | number:'1.1-1'}}
within a standalone component, you can import it by importing DecimalPipe
:
import { DecimalPipe } from '@angular/common';
@Component({
selector: 'app-my-component',
standalone: true,
imports: [
DecimalPipe
],
templateUrl: './my-component.component.html',
styleUrl: './my-component.component.scss'
}) /* ... */