Reputation: 12005
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()"?
Upvotes: 0
Views: 51
Reputation: 222532
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.
Upvotes: 2