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'
}) /* ... */
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow