I've a function which returns a list of ID:s as strings. Now it prints out 1,2,3 etc
I would like to name each string rather than having it as numbers like:
1 == 'NameOne'
2 == 'NameTwo'
3 == 'NameThree'
x.component.ts
- printUser(ids: number[]): string {
- return ids.sort().join(', ');
- }
- "x.users.length > 0"> User:
- {{ printUser(x.user) }}

Debarshi ChakrabortyRank #4,064 · 368 reputationPosted Apr 26, 2021, 3:46 PM EDT