I need to provide simple array of data with years. What will be right to create: pipe or typically service class?
Iameging, that it is pipe. Then can I iterate this pipe in ngFor like this:
ngFor="item of pipe()"?
I need to provide simple array of data with years. What will be right to create: pipe or typically service class?
Iameging, that it is pipe. Then can I iterate this pipe in ngFor like this:
ngFor="item of pipe()"?
You should create an array in this case, neither pipe nor a service.
You can create an array by calling a function with the name pipe() though, that would return an array with your specified data.
pipe or service not difference? Can I call pipe name in ngFor?constants.ts) and then import it in each component