I have exported function in separated file
export function sum(population): string {
return population.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
I am import this function in my component:
import { sum } from '../../shared/utilities/globalFunction'
And how to use this sum in html ?
When i set
<p> {{ sum(variable-with-data) }}
no work...